React Flashcards
What is React?
A JavaScript library for building user interfaces
What is a React element?
Not a DOM object but just a plain JavaScript object
How do you mount a React element to the DOM?
What is Babel?
JavaScript Compiler
back conscripting javascript code
What is a Plug-in?
software component that adds a specific feature to an existing computer program
What is a Webpack loader?
Loaders are transformations that are applied to the source code of a module
How can you make Babel and Webpack work together?
babel loader
What is JSX?
it is a syntax extension to JavaScript that produces React elements
Why must the React object be imported when authoring JSX in a module?
JSX creates react elements and so it relies on React object to be able to produce the element
JSX = React.createElement
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
Babel loader and other plugins
What is a React component?
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation
How do you define a function component in React?
Literally JavaScript functions
function CustomButton( ) { return Click Me!< /button >; }
How do you mount a component to the DOM?
query select for element to append to
create react.root
render method with function component element as argument
What are props in React?
props are object arguments with data that are accepted by function components to return a React element
How do you pass props to a component?
Define a new element with the function component and define the specified property to use it