Quick Command Access
- Posted on July 6, 2024
- React JS
- By MmantraTech
- 147 Views
Here's a cheatsheet for setting up projects with React, Vite, and Next.js:

1. Create a React JS App
Using create-react-app
-
Install
create-react-app
globally (optional):npm install -g create-react-app
-
Create a new React application:
npx create-react-app my-react-app
-
Navigate to the project directory:
cd my-react-app
-
Start the development server:
npm start
2. Create a Vite App
Using create-vite
-
Install Vite (optional):
npm install -g create-vite
-
Create a new Vite application:
npm create vite@latest my-vite-app
-
Navigate to the project directory:
cd my-vite-app
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
3. Create a Next.js App
Using create-next-app
-
Install
create-next-app
globally (optional):npm install -g create-next-app
-
Create a new Next.js application:
npx create-next-app my-next-app
-
Navigate to the project directory:
cd my-next-app
-
Start the development server:
npm run dev
To install SASS in react js project :
nstall react-icons
:
npm install react-icons
Notes:
- You can also use
yarn
instead ofnpm
for package management. - For all of these frameworks, it's a good practice to initialize a git repository and create an initial commit:
bash
These commands will get you started with your projects quickly and efficiently!
Write a Response