A new React project uses many dependencies, configuration files, and other requirements such as Babel, Webpack, ESLint before writing a single line of React code.
- React requires Nodejs. Download it from the link below.
Download | Node.js
- After installing Nodejs, open your Terminal or Visual studio code terminal and type the following command to create your first React app:
npx create-react-app my-app // creating your app named my-app
cd my-app // entering the code folder
npm start // starting the development server
- Finally, your application will start on your localhost.
The create-react-app is a wonderful tool for beginners, that helps you to make and run React project quickly. It doesn’t take any configuration manually. This tool is wrapping all of the specified dependencies like Webpack, Babel for React project itself and so you can write the React code. This tool sets up the initial development environment and optimizes the app for production.
You can also refer installation steps here.
Hope you understand the basics of React JS. Feel free to ask your questions in the comment sections. Know the basic folder structure of React here.
Happy React Coding….