Blog_401

David Hebert
1 min readJan 24, 2021

Why/when would you use a class-based component vs a functional component.

With a functional component you can’t set the state, with a class based component, you can set the state.

What is create-react-app?

This is a quick command to build a simple react app that can then be edited.

What is JSX?

JavaScript XML, which is basically HTML but in React.

How does React work?

React uses a virtual DOM so that it can update the front end much more quickly than base JavaScript.

How does the virtual DOM work in React?

React quickly updates the virtual DOM instead of waiting on the standard JavaScript DOM tree.

What’s the difference between an element and a component in React?

A component is a function that can accept an input and return a React element.

A React element is an object that describes a DOM node, it’s attributes, and the properties that you give it.

--

--