Prerequisites
There are a few things you should know in advance before you start playing around with React.
Here are what I consider to be React prerequisites.
- Basic familiarity with HTML & CSS.
- Basic knowledge of JavaScript and programming.
- Basic understanding of the DOM.
- Familiarity with ES6 syntax and features.
- Node.js and npm installed globally.
Setup and Installation
npx create-react-app is the command to setup and install a react app. Its a built in package comes with nodejs. Run the below command to create a react app. It will take some time, wait for it to complete the setup.
npx create-react-app react-app
Here react-app is the folder name in which react config & setup files will be created by react to run a react-app.
Go to newly created app and run the below command to run the app.
cd react-app
npm start
npm start will run your react app.
Now, Edit src/App.js and save to view the effect.
Feel free to leave a comment for any questions and issues.