how to start react js code example

Example 1: npx create-react-app

npx create-react-app my-app
cd my-app
npm start

Example 2: how to start react project

npm i npx
npx create-react-app my-app
cd my-app
npm start

Example 3: install react js

npx create-react-app <appname>  //  eg:  npx create-react-app blog
cd <appname>  // cd blog
npm start  //runs on localhost:3000

Example 4: reactjs install

npm install -g create-react-app -> install create react app tools
create-react-app app01 -> create your first projects app001

Example 5: react js documentation

//With node and npm already installed for basic start

npx create-react-app my-app-name

// if you want to use npm 

npx create-react-app my-app-name --npm

//if you want to use typescript 

npx create-react-app my-app-name --template typescript

yarn start // app will be hosted on localhost:3000

/* start making changes at ./my-app-name/src/App.js
	React documentation: https://reactjs.org/docs/hello-world.html
*/

Example 6: create react app

npx create-react-app  my-app // my-app or Enter Your Project name
cd my-app // To enter your creating app by command cd 
npm start // To start your app in default browser