March 7, 2023

Create a React Project

Because my project folder is located at the root directly, so I have to add sudo to grant access. If your project is not located at root directory, you can remove sudo.


  1. Create React project
1
2
3
cd /YourProject
sudo npx create-react-app YourReactAppName(must_in_lowercase)
# Eg. sudo npx create-react-app reactdemo
  1. Open the generated folder in editor. Here I used VSCode. Open Terminal in VSCode, run React project.
1
sudo npm start

​ You should be able to see a webpage popup with a React logo in it.

  1. Install Material UI with styled-components
1
sudo npm install @mui/material @mui/styled-engine-sc styled-components
  1. Install Material Icons
1
sudo npm i @mui/icons-material


Reference

About this Post

This post is written by Andy, licensed under CC BY-NC 4.0.

#React