Create a React App

Feb 4, 2023

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.

💡

In my opinion Next.js is the best way to create a "web app". This is only a React App without all advanced features of Next.js.

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

node

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

$ node --version
node-version

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

This is roughly what it should look like

vite-cli

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

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!

Let your imagination wander and create.