Either install nvm or node >= 10.
To install or update nvm, run the install script for nvm located here or using the following commands.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
If you have troubleshooting issues, check out the github repo for nvm.
To install nvm on Windows, download the installer here.
If you have issues or need more info, check out the github repo for nvm-windows.
We can to install the latest version of node and make sure we use it.
nvm install 14
nvm use 14
node --version
This repo contains starter code (with some CSS formatting and the file structure) and the finished code from the demo. Take a peek or try running it locally by running a few commands below.
git clone https://github.com/kristenkoyanagi/intro-to-react
cd intro-to-react
cd my-starter-app
npm install
npm start
Run the create-react-app
Run either block of commands below.
npm init react-app my-app
cd my-app
npm start
npx create-react-app my-app
cd my-app
npm start
npm and yarn are separate node package managers that helps you install dependencies, test, run, and build your app. You can use either one as long as you stick with one.
If you open http://localhost:3000, you should see the starter app running from the create-react-app
command.
Check some of these out if you want to learn more about React: