To use create-react-app, you will need NPM version 5.2+. You can install the latest version of Node.js from https://nodejs.org/en/download/ and you should have npm installed.
- Launch a Terminal or Command Prompt. The command to create a new application is as follows:
npx create-react-app react-todo-app
react-todo-app is the name that we give to our application.
- The following screenshot shows the command execution in progress:
- When the installation completes, you should see a success screen similar to the following:
- You can cd into the react-todo-app folder using cd react-todo-app/ and run the npm start command, as shown in the following screenshot:
- You should see the application launch, as shown in the following screenshot:
create-react-app and npm start might take a few minutes if this is the first time you are creating a react application.
Congratulations! You are up and running with a React application.