Search⌘ K
AI Features

Setting up the React Application

Explore the process of installing necessary tools like npm and create-react-app to set up a React environment. Learn to initialize a React project, understand its file structure, and run the development server to see live updates. This lesson prepares you to create client-side pages using React in full stack development.

Setting up the environment


Note: All the steps in this lesson are to set the environment up in your local machine.


Getting started with React is fairly easy, thanks to the useful set of build tools. First, we install the Node Package Manager, often referred to as “npm”. It is used to manage the packages in any given project. We then install create-react-app, a tool for starting with a React front-end. The -g flag tells npm to install it globally, rather than in the local project.

On a Mac, we ...