Create a React Project Using Vite

--

Turn on your terminal and check your node version. It has to be above 20. If not, go to nodejs.org and download the latest version. Then move to a location where you want to save your React project. Type: “npm create vite@latest.”

Vite helps us create and host a new React project. We’ll rely on its default settings so that we can use it without learning it.

First, we set a project name and use it as the package name as well. Vite supports many frameworks. We select React and pick the third variant.

Next, we move into the project directory and run the “install” command to install the needed dependencies.

Now, everything is ready. We run the “dev” command to turn on the Vite dev server.

If you can see this page, then you have successfully set up a React project.

--

--

No responses yet