jsx Flashcards
1
Q
What is JSX?
A
JSX stands for JavaScript XML. It is simply a syntax extension of JavaScript. It allows us to directly write HTML in React (within JavaScript code).
2
Q
Why must the React object be imported when authoring JSX in a module?
A
The JSX gets internally into many React. createElement() function calls and each of them returns an object as shown above. Now because of this, we need to import React from “react” since internally every JSX is creating a React Component using JSX transformer
bascically without react jsx wont work
3
Q
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
A
with plug ins in babel????