DEV Community

Shweta
Shweta

Posted on • Edited on

Getting started with React

Running React on my system for the first time was not a great experience, so here I am sharing how to do it quickly for anyone out there wanting to get started with it.

Steps:

//Check nvm version
> nvm --version 
Enter fullscreen mode Exit fullscreen mode
  • Use terminal in administrator mode;

  • Now, Install the LTS version of npm.

> nvm install latest
Enter fullscreen mode Exit fullscreen mode
  • Check npm version
> npm --version
Enter fullscreen mode Exit fullscreen mode
> node --version
Enter fullscreen mode Exit fullscreen mode

Now we can set React application locally, 
Open terminal in VScode and write:

> npx create-react-app my-app

> cd my-app

> npm start
Enter fullscreen mode Exit fullscreen mode

(my-app is the name of react project, this can be changed)

Voila!
The browser will open itself with the react app running, now you can change according to your wants.

Additionally, write

> npm start
Enter fullscreen mode Exit fullscreen mode

whenever you need to run the application again after you closed the entire code.

Top comments (0)