React Flashcards
What is React?
A JavaScript library that combines front-end components into JavaScript. (HTML and CSS)
What is a React element?
An object representation of the DOM.
How do you mount a react element to the dom?
ReactDOM.createRoot . render()
What is JSX?
JSX is a syntax extension for JavaScript that lets you write HTML-like markup inside a JavaScript file.
Why must the React object be imported when authoring JSX in a module?
Because JSX works with React through ReactDOM.createRoot.render()
If you don’t it will be undefined and the call will fail.
How can you make Webpack and Babel work together to convert JSX into valid Javascript.
Use babel-loader, @babel/core, @babel/plugin-transform-react-jsx