Putting it all together

Install node and yarn first

Before you start, make sure that you have npm, yarn and node.js installed. Follow the node.js setup guide if you haven't yet.

The first first three steps of this guide from freecodecamp covers the same commands used here but explain them in greater detail.

1. Create a new React application using Create React App (CRA)

Run this command in your terminal to create a new react application. We will be using the name myfirstreact as our application name.

npx create-react-app myfirstreact

2. Run the React app

Change your directory to the folder CRA just created by using the cd command.

cd myfirstreact

Run this command to run the React application myfirstreact:

yarn start

In this course we will be using yarn, but if you prefer you can use npm. We suggest using yarn. If you want to learn more about yarn vs npm you can read this article

3. Get started with your coding

Navigate to the /src/app.js file and you can modify the content by editing what's returned by the the App() component. We recommend following one or more of the tutorials on the next page to get started.