Skip to main content

React Project Setup

Installation Steps:

Once you have Node.js and npm installed, follow these steps to create a React application:

  • Create a React App: Open your terminal and run the following command to create a new React application. Replace my-react-app with your desired project name:

        npx create-react-app so-training

    This command will set up a new React project with all the necessary files and dependencies.

  • Navigate to Your Project: Change your working directory to the newly created React app:

      cd so-training
  • Start the Development Server: Run the following command to start the development server:

        npm start

    This will launch your React app in a web browser. By default, it will run on http://localhost:3000.

  • Edit Your App: You can now start editing your React app using your preferred code editor or IDE. The main React code is usually found in the src directory.

  • Learn React: To learn React, refer to the official documentation and tutorials: https://reactjs.org/docs/getting-started.html

That's it! You now have a working React development environment on both Windows and macOS. You can start building your React applications.