Skip to main content

Command Palette

Search for a command to run...

How to install React:

Updated
1 min readView as Markdown
How to install React:
  1. download and install nodeJs

    This will include npm and npx

  2. Create a folder

  3. open cmd with the same folder

  4. Check the version of node by typing node-v

Setting up a React Environment:

To create a React application with create-react-app, follow these steps:

  1. Create a React application:

    • Open your terminal and run the following command:

      npx create-react-app my-app

after the installation in cmd file there should be written: 'Happy Hacking!' as your react is installed successfully

  • Replace my-app with your desired project name.
  1. Navigate into your project directory:

    cd my-app

  2. Start the development server:

    npm start

    This will run the app in development mode and open it in your default browser.

  3. Explore and modify your app:

    • The main files to edit are located in the src directory, where you can start building your react components.

These steps will set up a new React application with a pre-configured build setup, so you can focus on writing your code.