I am writing this blog to help those people, who didn't follow 'npx create-react-app my-app '.
*Note: The basic requirement to start react: Node should be installed.
Initialized a new project.
Create a new folder in the local name <ReactAppName>. Open VsCode in the same folder. Open the terminal using the key ctrl+` and run the below command.
npm init
ornpm init --y
Install React, ReactDOM, React Scripts:
Run the below command to install basic dependencies for react.
npm install react react-dom react-scripts
Create Folder Structure as per given:
Write HTML code inside index.html
Write React code inside index.js
Write code inside App.js
Write the start script inside package.json to run the react app.
Now, open the terminal again and run the below command.
npm start
Note: The application is running on port 3000. If you wish to change the port, create a '.env' file and add 'PORT=4001' to customize it.
That concludes the basic setup for React. Thank you for joining me on this journey, and I would love to hear any feedback or suggestions from your side.