react Flashcards
What is React?
A JavaScript library for building user interfaces or UI components
What is a React element?
an object describing a component instance or DOM node and its desired properties
How do you mount a React element to the DOM?
ReactDOM.render(element, container)
What is Babel?
Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backward-compatible version of JavaScript in current and older browsers or environments.
What is a Plug-in?
is a 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?
by adding babel-loader to the list of modules in webpack.config
What is JSX?
A syntax extension of JavaScript.
Why must the React object be imported when authoring JSX in a module?
Becasue the React library must be in scope from the JSX code in order to make calls to React.createElement
How can you make Webpack and Babel work together to convert JSX into valid JavaScript?
by installing the react plugin
What is a React component?
a JavaScript class or function that optionally accepts inputs i.e. properties(props) and returns a React element that describes how a section of the UI (User Interface) should appear.
How do you define a function component in React?
By writing a JavaScript function that accepts props as a single argument and returns a React element
How do you mount a component to the DOM?
ReactDOM.render( )
What are props in React?
They are objects used to pass data between react components
How do you pass props to a component?
ComponentName (props)