Setup VITE + React + Typescript in 3 steps
In this quick guide, we'll walk through the steps to set up a Vite project with React and TypeScript.
Step 1: Create a Vite Project
Open your terminal and run the following commands:
npx create-vite my-react-app --template react-ts
cd my-react-app
Step 2: Install Dependencies
Install the project dependencies using npm:
npm install
Step 3: Start the Development Server
Run the following command to start the development server:
npm run dev
That's it! You've successfully set up a Vite project with React and TypeScript. Your Vite + React + TypeScript app is now running at http://localhost:3000
. Open this URL in your browser to see your new project in action.
Note:
Feel free to explore the project structure and make changes to the code in the src
directory. Vite supports hot module replacement, so you'll see your changes instantly in the browser.
Happy coding!