Skip to main content

Command Palette

Search for a command to run...

Stop using create-react-app !!

Updated
1 min read
Stop using create-react-app !!
V

I am a Full Stack Developer from Mumbai, India. Currently I'm pursuing my Bachelors in Computer Science.

Why to avoid create-react-app ?

React is a popular choice for many web developers, but setting up a React project can be time-consuming. In this blog post, I'll show you a trick to set up your React project much faster using Vite.

What is Vite?

Vite created by Evan You the creator of Vue.js is a modern tool that is becoming increasingly popular due to its near-instant code compilation and rapid hot module replacement.

Why use Vite?

It's fast—like, really fast. 10x faster than webpack. Part of the reason it's so speedy is that it uses esbuilt for pre-bundling dependencies during development. Esbuilt is written in Go Language, which is known for its speed.

Let's create a react app with Vite

Use ``` npm create vite@latest



![Screenshot (510).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1668680322016/AfON8EFQR.png align="left")

Give a name to your project and select a framework

![Screenshot (511).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1668680354872/QvEf_072h.png align="left")

Navigate to your project folder and use ```
npm install
``` to install dependencies

![Screenshot (513).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1668680415467/4hFSGSQN3.png align="left")


Use ```
npm run dev
``` to start your react application


## Conclusion
This blog was created to show how quickly Vite can create a react app. I hope you enjoyed the blog. You might need a REST API to fetch data checkout [How to setup a fake REST API in 5 steps](https://vishvsalvi.hashnode.dev/setup-a-fake-rest-api-in-5-steps).

BYE👋