react-jsx Flashcards
1
Q
What is JSX?
A
JSX is a syntax extension for JavaScript that allows embedding HTML-like code within JavaScript code.
2
Q
Why must the React object be imported when authoring JSX in a module?
A
because JSX code gets transpiled into JavaScript code that uses the React API
3
Q
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
A
Install the required dependencies, Create a webpack.config.js file, specify which Babel presets to use in a .babelrc file in the root directory of your project, Update your webpack.config.js file to use the Babel loader. (plugin-transform-jsx)