React Installation

This page guides how to setup a react app using Vite as bundler

1

Initialize a Vite React Application

  1. Open a terminal in the directory where you want to create your project:

  2. Use the yarn create command to create a new Vite Project:

yarn create vite

Enter the project name and framework when prompted

 Project name: ... OrbitNavigator
 Package name: ... orbitnavigator
 Select a framework: » React
 Select a variant: » JavaScript
2
cd OrbitNavigator
3

Install Dependencies

Run the following command to install all the required dependencies:

yarn install
4

Start the Development Server

  1. Start the Vite development server:

yarn dev
  1. Press O + enter on the terminal, this will open a browser window with an example react application loaded.

Project Structure

The Project Structure should look like this

my-react-app/
├── node_modules/
├── public/
├── src/
   ├── App.jsx
   ├── main.jsx
   ├── app.css
   └── index.css
├── .gitignore
├── index.html
├── package.json
├── vite.config.js
└── yarn.lock

Last updated