Scaffolding a React App

It might seem overwhelming to look at the file structure of some of the open source React projects, but with the create React App template, it becomes simple to get started.
To get a template application up and running, we will need to follow these steps in our terminal; note that I am using the Mac terminal, but you can use Linux/Windows OS:

  1. Install the create-react-app via npm using the following command:
npm install -g create-react-app

The following screenshot shows the console output once create-react-app is executed in the terminal:

  1. Create a React project named filedrop-ui using the following command:
create-react-app filedrop-ui

The following shows the console status when the create-react-app is scaffolding the React project:

  1. At this point, once you cd into the app and run it, you should see a React App already running. Use the following commands:
cd filedrop-ui/
npm start

You will also see a folder structure, as shown in the following screenshot:

Let's dig into what each file will contain.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset