To create a new React app, you will need to have Node.js installed on your system.
1. First, open your terminal and navigate to the directory where you want to create your new app.
2. Then, enter the following command to create a new React app:
npx create-react-app my-app
Replace "my-app" with the desired name for your app. This will create a new directory with the given name and generate the basic files and structure for a React app.
3. Next, navigate into the new directory by entering the following command:
cd my-app
4. To start the development server and see your app in action, enter the following command:
npm start
This will start the development server and open a new browser window with your app. The development server will automatically reload the app whenever you make changes to the code, so you can see your changes in real time.
That's it! You now have a basic React app up and running. You can start building your app by modifying the files in the `src` directory.
Comments (0)