Create-React-App
2 min readJul 22, 2021
Prerequisites
- HTML+CSS+JavaScript (basic)
- Node.js (npm package manager)
- Code editor
Support
- Node.js: https://nodejs.org/en/
- Preferred code editor: https://code.visualstudio.com/download
- React.js: https://reactjs.org/
Create-React-App (create react app folder inside parent folder)
- Create a folder on your local machine
OR
Create a repository on your GitHub account - Open the folder/repository in the code editor
- Start the terminal on the code editor
Shortcut: Ctrl+` - Run npm init — — yes
- Now you can see the package.json file created in your folder
- Run npx create-react-app myappname
Note: you can change the app name from “myappname” to meet your requirements - Now you can see the react app folder created in your parent folder.
- Run cd myappname
Note: in place of myappname, add the app name you gave in step 6 - To start the app, run npm start
- To build the app, run npm run build
Create-React-App (create react app in parent folder)
- Create a folder on your local machine with lowercase
OR
Create a repository on your GitHub account - Open the folder/repository in the code editor
- Start the terminal on the code editor
Shortcut: Ctrl+` - Make sure your folder contains nothing
- Run npx create-react-app .
Note: use dot instead of appname - Now you can see the react app created in your parent folder.
- To start the app, run npm start
- To build the app, run npm run build