BlogPost_401

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.

It is a package that either yarn or npm uses to install the react app.

A lot of that is stated above. Class based components have state, as well as life cycle methods, are are built within the class syntax in javascript. Functional components are just functions that returns a react element.

JavaScript XML. It allows us to write html in react.

React is a JavaScript library (not a framework) that creates user interfaces in a predictable and efficient way using declarative code.

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.

What?

A elements is an object, while a component is a function.

#ACA

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store