Create React App is an officially supported way to create React applications.
All you need to do to create a new React app is run the npx command. You say npx create-react-app app-name. The app-name that you want your app to have.
npx downloads the lastest version of create-react-app templates.
Note: npx comes with npm 5.2 and higher.
I’m going to go terminal and run the “npx create-react-app first-react-app”.
npm init react-app first-react-app
yarn create react-app first-react-app
Inside the newly created project, you can run some built-in commands:
npm start or yarn start
Then open http://localhost:3000/ to see your app.
npx create-react-app my-app cd my-app npm start