react-jsx Flashcards
1
Q
What is JSX?
A
it is a syntax extension to JavaScript. JSX produces React “elements”. React doesn’t require using JSX, but most people find it helpful as a visual aid when working with UI inside the JavaScript code. It also allows React to show more useful error and warning messages.
syntactic sugar
2
Q
Why must the React object be imported when authoring JSX in a module?
A
Since JSX compiles into calls to React.createElement, the React library must also always be in scope from your JSX code.
3
Q
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
A
@babel-transform