Lesson 4 - Create and Run a React Project with Vite - Full Overview

React Dev Site

  1. visit https://react.dev/ and click Learn React ( https://react.dev/learn)

  2. go to installation menu (https://react.dev/learn/installation) and in this chapter session, click "How to start a new React project"

Vite

  1. go to vite.dev site and click get started (https://vite.dev/guide/).

    1. Vite requires Node.js version 18+ or 20+.

  2. Open Bash/PowerShell terminal and create your working directory, ie. "react-sandbox". Change the directory to "react-sandbox" and install vite latest version.

S npm create vite@latest

Then follow the prompts!

  • Project name: react-hook-state-management

  • Select a framework: > React

  • Select a variant: > JavaScript

  1. Change the directory to "react-hook-state-management". And then install and run.

cd react-hook-state-management
npm install
npm run dev
  1. Click : http://localhost:5173

Last updated