react-jsx Flashcards
1
Q
What is JSX?
A
JSX is an XML-like syntax extension to ECMAScript w/o any defined semantics.
It is called JSX, and it is a syntax extension to JavaScript.
Used to write HTML tags inside JavaScript.
JSX is an XML/HTML-like syntax used by React that extends ECMAScript so that XML/HTML-like text can co-exist with JavaScript/React code
2
Q
Why must the React object be imported when authoring JSX in a module?
A
JSX is syntactic sugar, React.render() or React.createElement(); belongs to React
3
Q
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
A
Use babel loader and install the babel-plugin that transforms React JSX