Create React App
In the previous tutorial, we explored how react can be added to a HTML website from the CDN. In this section we will explore the second and probably the most popular way of using the React JS library: React as a single page application using the
Running Create React App on the CLI, requires that you have Node >= 6 and npm >= 5.2 on your machine.
To get started, install create-react-app on your local machine globally from npm via the cli using the following commands:
npm install -g create-react-app
After the installation, quickly create your desired awesome react application using this command
create-react-app example-app cd example-app
Building and running an application
Inside of your application’s folder, you can run the following commands
Runs the app in development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see the build errors and lint warnings in the console if any.
Create React App doesn’t handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any backend you want. Under the hood, it uses Babel and webpack to spin up your application.