Now that we have Node.js and the code editor installed, we are ready to create our first React.js app. We are using Facebook's create-react-app command (https://github.com/facebook/create-react-app) for this. Here are the steps you need to follow in order to make your first app:
- Open PowerShell or the Command Prompt tool and type the following command:
npx create-react-app myapp
This command creates a React app named myapp. Npx is the npm package runner and, when you're using it, you don't have to install the package before running it:
- Once the app has been created, move it into your app folder:
cd myapp
- Then, we can run the app with the following command. This command runs the app in port 3000 and opens the app in a browser:
npm start
- Now, your app is running, and you should see the following page in your browser. The...