- Why/when would you use a class-based component vs a functional component?
Class based components will be your choice if you have an object with states, as this is unavailable to functional components, or if you want to take advantage of the built in life-cycle methods. Functional components are typically better practice, even though they have less built in functionality. They are easier to read, take less memory and are generally considered a better practice.
- What is create-react-app?
It is a package that either yarn or npm uses to install the react app.
- What are the differences between a class component and a functional component?
- What is JSX?
- How does React work?
- How does the virtual DOM work in React?
Where the regular DOM when updated has to re-render all of the child and parent nodes of the DOM. In comparison the virtual DOM compares which child nodes have been altered, and uses the built in functionality to find the quickest way to update by updating only the changed elements.
- Which (if there is) node library method could you use to solve the algorithm problem you solved last night in your pre-homework?
- What’s the difference between an element and a component in React?
A elements is an object, while a component is a function.