React Docs Flashcards
What is the command to create a new project using NPM?
npm init -y
What does Babel do?
It accepts ES6 and React code as input, and creates regular JavaScript as output.
What is the process of converting ES6 source code to old-school JS called?
Transpiling.
What does Webpack do?
it is a tool that converts all our source code into one finished app ready to ship to users. It is controlled by the webpack.config.js file.
What npm package allows you to run a webpack dev server locally?
webpack-dev-server
What does the “export” keyword mean?
It means that the component is being exposed to the rest of the app to use.
What does the “default” keyword mean?
It means its the only thing this class will expose.
What is hot loading?
It’s a way to update the code in a running application without restarting or resetting the application state.
What does ReactDOM do?
It imports the React tools required to render to the DOM.
What two parameters does ReactDOM.render take?
Some JSX to render and where to render it to.
How does JSX know what means?
From the name it is imported under.
What is JSX?
It is a syntax extension to JavaScript. It produces React elements.
How can you embed any JavaScript expression in JSX?
Wrap it in curly braces.
Why is it recommended that you wrap multi-line JSX in parentheses?
To avoid the pitfalls of automatic semicolon insertion.
What do JSX expressions become after compilation?
Regular JavaScript objects.