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 .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly