React is a JavaScript library for building user interfaces. Please refer the link for more information - React Docs
Install react and react-dom in the global environment
npm install react
npm install react-dom
Use the package manager, npm init
npm install -y
npm init
Now its time to install the bundler which helps us to manage all the services across the project. We are going to use parcel. Refer the docs for more information.
npm install -D parcel
or
npm install --save-dev parcel
{
"name": "learning-react",
"version": "1.0.0",
"description": "This is a live react class",
"main": "App.js",
"scripts": {
"test": "jest"
},
"repository": {
"type": "git",
"url": "git@github.com-personal:ravichandola/Learning-React.git"
},
"author": "Ravi Chandola",
"license": "ISC",
"keywords": [],
"devDependencies": {
"parcel": "^2.8.2",
"process": "^0.11.10"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
npm install --save-dev @babel/preset-env
We need to run this command in our console and then set the configuration of babel for the same in babelrc file
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.