Creating and Testing a React App
Create a React app
Note: If you manage dependencies on your machine with Yarn, download the package runner npx
. However, if you use NPM for dependency management, you can skip that step because npx
is already bundled with NPM (version 5.2 or higher).
To add npx
to Yarn, run this command on your terminal:
Afterwards, create a starter React project, which you will tweak as you proceed with this tutorial:
Test the Sample React App
To ensure that the project is in place, go to the app's directory and start the development server:
The above command starts a development server on http://localhost:3000
. Navigating to that URL on your browser displays the React app:
Last updated