Install and use React
React is not the type of framework where you install it, and the whole functionality comes directly out of the box. For better performance it's creators have split functionality to smaller pieces of code (packages or modules) and each one does a separate task. Thus depending on what we want to do, we install the necessary package.
There are though couple of packages that are considered necessary for a react application to run. These are the react core library and the react-dom. These are the 2 first packages we have to install as shown above, looking at the first picture (the top one).
Attetion: If you have already downloaded and executed create-react-app script as shown in previous examples, you can safely omit this step, as react and react-dom are already installed through the create-react-app process. The modules have been also imported, and the only thing we have to do is to run 'npm start'. This will start a dev-live server, that will automatically reload our application in the browser as soon as we save any changes in our code.
After installing, the second step is to import them to our application. We use the ES6 import statement as shown to the second image above for that. React will take care of the rest and translate this import statement to something the browsers can understand.