How to create a React 19 app with Vite?
Setting Up Your React 19 App: A Complete Walkthrough
1 min readDec 30, 2024
When writing this article, running npm init vite@latest wasn’t the express route to a React 19 app. 🚀
To kickstart your shiny new ⚛ React 19 project, you’ll need to take a couple of extra steps. Here’s how to do it like a pro:
Step 1: Create a new app with vite. It will use React 18
npm create vite@latest
Step 2: Run bellow commands to get react 19
npm install react@latest react-dom@latest
Step 3: Optional (Run these commands to update the types)
npm install --save-dev @types/react@latest @types/react-dom@latest
Step 4: Run And Code 🚀
Here is a repo for Starter React 19 App, which you can fork and use directly
And if you are upgrading, check the official docs for upgrading steps.