DEV Community

Ameya Lambat
Ameya Lambat

Posted on

Create a React App

React is an open-source front-end JavaScript library for building user interfaces based on UI components.

There are many ways to create a new React App, but in my opinion using Vite is currently the best way to do it.

First step is to download the LTS version Node.js from https://nodejs.org/en/

NodejsSS

If you have already done this before you can check your node version in your terminal.

node --version
Enter fullscreen mode Exit fullscreen mode

nodeversion

If this is working for y'all we can move on to using Vite!

First run the command below and follow the prompts

npm create vite@latest
Enter fullscreen mode Exit fullscreen mode

This is roughly what it should look like

vitecli
You have successfully created a React app. Now let's test it by running the following commands.

cd <Your-Project-Name>
npm install 
npm run dev
Enter fullscreen mode Exit fullscreen mode

After running these in your terminal, open the localhost link in your browser and you should see your React-Vite app running!

preview

Hope you liked this post and learned how to create your first React-Vite App!

Oldest comments (0)