react-jsx Flashcards
1
Q
What is JSX?
A
Javascript XML that makes it easier to write and add HTML in react so that we can visually see the UI design in js code .
2
Q
Why must the React object be imported when authoring JSX in a module?
A
because JSX compiles into calls to React.createElement. that is why we need to import React library. (must be in scope).
createElement –> method of the React object.
3
Q
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
A
have plug in ‘@babel/plugin-transform-react-jsx’