React Environment Setup
Environment Setup for React
Install Node.js and npm
Node.js
is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a web browser.
NPM
stands for Node Package Manager and is the default package manager for the Node.js runtime environment.
Download Node.js:
Go to https://nodejs.org and download the LTS version.
Verify installation
Open a terminal and type
Create First Project
Install and create a project:
*npx create-react-app project1
The command initializes a new React application named "project1". It leverages npx, the Node Package eXecutor, to download and execute the create-react-app package, a tool designed to set up a basic React project structure with all necessary configurations and dependencies.
*npm start:
Starts the development server, enabling hot reloading for real-time updates in the browser as code changes.