starting react app code example

Example 1: react start new app

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

Example 2: 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 3: npm create react app

npx --ignore-existing create-react-app .

Example 4: install react app using npm

npx create-react-app umusic

Tags:

Misc Example