Installation
create-react-app is a zero-configuration starter kit for React introduced by Facebook in 2016. At that time, Facebook also released Yarn, their alternative to npm.
To get started, read the Creating an App section for the big picture.
Install create-react-app Globally
- Install Yarn. Yarn is a dependency for create-react-app.
MacOS: Install Yarn using the Homebrew package manager:
brew install yarn
Even with a successful install, you may get some error messages. To see if the install succeeded, run this command:
yarn --version
Windows: Download the Windows Installer from the Yarn site. WSL users (Windows Subsystem for Linux) do not have to do anything other than this.
- Open a shell (terminal or Gitbash).
- Use npm to do a global install of create-react-app:
Windows:
npm install -g create-react-app
MacOS:
sudo npm install -g create-react-app
- Check the version to verify a successful installation on your command line:
create-react-app --version
Next: Setup Atom for React
To configure Atom for React/JSX code, follow the directions in Install Atom Packages for React.