Installation of React Js application with Vite For Beginner's

Installation of React Js application with Vite For Beginner's

Steps to Follow:

  1. Ensure Node.js is Installed: Make sure Node.js is installed on your system.

  2. Navigate to Desired Directory: Go to the folder where you want to set up your React.js application.

  3. Initialize Vite Project: Open the terminal in that folder and run the following command:

     npm create vite@latest
    
  4. Configure Project: Follow the prompts to set up your project:

    • Project Name: Enter your desired project name (e.g., vite-project).

    • Select a Framework: Choose React (or another framework like Vue or Angular if preferred).

    • Select a Variant: Choose JavaScript or TypeScript as per your preference.

  5. 
     ✔ Project name: … vite-project
     ✔ Select a framework: › React
     ✔ Select a variant: › JavaScript
    
  6. Navigate to Project Directory: Change into the project directory using:

     cd <project-name>  
     # Replace <project-name> with your actual project name, e.g., cd vite-project
    
  7. Install Dependencies: Run the following command to install the necessary dependencies:

     npm install
    
  8. Run the Application: Start your application using Vite with the command:

     npm run dev
    

These steps will help you set up and run a React.js application using Vite efficiently.