Step 1

There are several different ways to create a React application. Consult the documentation here.

We are going to use NPM's package runner, NPX, for scaffolding our React app using the create-react-app package.

npx create-react-app sleep-time-react

The create-react-app is a command-line tool that scaffolds a React application.

Using create-react-app, there is no need to install or configure module bundlers like Webpack, or transpilers like Babel. These come preconfigured (and hidden) with create-react-app, so you can jump right into building your app!

Change directory to sleep-time-react. Run the application:

npm run tart

Point your browser to http://localhost:3000/