DEV Community

Cover image for Create React App vs Vite: Setting Up React on Linux Made Easy
Sevaki Rajasekar
Sevaki Rajasekar

Posted on

Create React App vs Vite: Setting Up React on Linux Made Easy

Hi everyone! Today we are going to see about two types React installation method in Linux.

Are you starting your React journey on a Linux system and confused between using Create React App (CRA) and Vite? In this blog, I’ll walk you through what they are, how to install them, and which one might be better for your next project.

What is Create React App (CRA)?

CRA is the official React setup tool that creates everything you need to start a React project without configuring Webpack or Babel manually.

Features:
- Beginner-friendly
- Comes with sensible defaults
- Supports JSX, ES6+, and more out of the box

Installing CRA on Linux

# Step 1: Install Node.js and npm (if not already)
sudo apt update
sudo apt install nodejs npm

# Step 2: Create a new React app
npx create-react-app my-app

# Step 3: Navigate to your project
cd my-app

# Step 4: Start the development server
npm start

So,let's see about vite tool,

What is Vite?

Vite (pronounced “vite” like “light”) is a modern build tool that’s faster and more efficient than CRA. It uses ESBuild under the hood, offering super fast startup and hot reload.

Features:
- Super fast dev server
- Supports JSX, TypeScript, Vue, etc.
- Lightweight and minimal

Installing Vite on Linux

# Step 1: Install Node.js and npm (if not already)
sudo apt update
sudo apt install nodejs npm

# Step 2: Create a new Vite React app
npm create vite@latest my-vite-app

# Step 3: Choose 'React' and a variant (JavaScript or TypeScript)

# Step 4: Navigate to the project
cd my-vite-app

# Step 5: Install dependencies
npm install

# Step 6: Start the development server
npm run dev

Which One Should You Use?

- **If you're just starting React and want official tools:** Go with CRA.
- **If you want speed and modern dev experience:** Try Vite.
- Both are great, try both once and choose based on your style.
Enter fullscreen mode Exit fullscreen mode

That's it guys. I hope I gave a clear explanation. Whether you choose CRA or Vite, you're building awesome things with React! I hope this guide helped you understand the differences and how to install them on Linux. Feel free to share your thoughts or questions in the comments.

Reference: https://www.geeksforgeeks.org/techtips/how-to-install-reactjs-on-linux/

Top comments (0)