Skip to main content

Command Palette

Search for a command to run...

Set Up React Typescript with Vite | Thirdy Gayares

Updated
1 min read
Set Up React Typescript with Vite  | Thirdy Gayares

Original Content → https://thirdygayares.com/react/set-up-react-vite-typescript

In this article, I will show you how to set up a React project using Vite and TypeScript step by step. This guide is perfect for beginners who want to start using React with TypeScript in a fast and efficient way. By the end, you will have a working project that is ready for development.

Important Note

Before starting, make sure you have Node.js installed on your machine. Vite requires Node.js to run. You can download and install it from the official website: https://nodejs.org/.

1. Create a Vite + React + TypeScript Project

Run the following command in your terminal:

npm create vite@latest my-new-app --template react-ts

1. Create a Vite + React + TypeScript Project

Choose React:

2. Choose React

Choose Typescript:

3. Choose TypeScript

Then, go into the project folder:

4. Go to the Project


2. Install Dependencies

5. Install Dependencies

3. View Source Code on your favorite IDE

View Source Code on your favorite IDE

4: Run your code

Run your code

Your React + Vite + TypeScript project is now ready!

React Setup Output