DEV Community

Cover image for Create-react-app or Vue in 5 seconds
Ismail
Ismail

Posted on • Edited on

Create-react-app or Vue in 5 seconds

vite
I know you loose your patience sometimes while setting up the react template using create-react-app and i completely agree with you. Don't worry I have got a solution for you.

Presenting you the new build tool calledVite.
Vite is a build tool which helps us for faster and leaner development experience for modern projects.

Let's get started without wasting the time...

There are different templates in vite:-
vanilla
vanilla-ts
vue
vue-ts
react
react-ts
preact
preact-ts
lit-element
lit-element-ts
svelte
svelte-ts
Enter fullscreen mode Exit fullscreen mode

I am downloading a simple react template. you can choose any template in the list above.

We can do it in 3 simple steps:-
1:-
Choose anyone command as per you package configurations.

# npm 6.x
npm init vite@latest sample-app --template react

# npm 7+, extra double-dash is needed:
npm init vite@latest sample-app -- --template react

# yarn
yarn create vite sample-app --template react
Enter fullscreen mode Exit fullscreen mode

reactjs

2:-
Now we get into the folder sample-app and install the required packages and dependencies using

npm install
Enter fullscreen mode Exit fullscreen mode

vuejs

3:-
Now just run the following command to start the development environment

npm run dev
Enter fullscreen mode Exit fullscreen mode

webdev

and that's it we are Done!
Visit the local server to see your react-app.

react

Have a look into my repos if intrested:-

My Github profile:- https://github.com/sk-ismail

Top comments (0)