How To Create React App

Sam Hall
2 min readSep 14, 2021

This is a guide to starting your React single page application with the Create React App environment.

Create React App

“Create React App” is perhaps the best environment for React beginners looking to create a Single Page Application or SPA: a dynamic web app implementation that only loads a single web document. Using the “Create React App” terminal command ensures your environment will have the latest version of Javascript and all its newest features, without the need for configuration — it’s all inclusive! To run this environment you’ll need to have a recent version of Node installed as well.

Run the command in your terminal as shown above. “npx create-react-app” followed by your app’s given file name separated by hyphens. “npx” is a command used to run a given “npm” package or command — it is essentially an npm package runner. “npm” is a package manager for the Node Javascript platform. Running this command in your terminal will queue a series of package installs and file creation to get your React app started. This package conveniently sets you up with all files and directories you will need to create your Single Page App, saving you many grueling minutes of creating to files, installing dependencies individually, etc. For a few moments after running this command your terminal will be busy doing all of these tasks for you:

There’s more!

Now you are able to cd into your file: “cd my-app-name” and run “npm start” which will run your app as it stands on a locally hosted browser.

Further Reading

https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b

https://developer.mozilla.org/en-US/docs/Glossary/SPA

https://docs.npmjs.com/about-npm

https://reactjs.org/docs/create-a-new-react-app.html

https://create-react-app.dev/docs/getting-started/

--

--