Vite is a fast build tool and development server for modern web projects. You should use it instead of Create React App because Create React App is deprecated and no longer maintained, while Vite starts quickly, updates the browser almost instantly as you edit, and produces optimised production builds. For new React projects, Vite is a simple choice when you do not need a full framework.
This guide explains what each tool does, why Create React App was retired, and how Vite compares, so you know what to use and what to ignore in older tutorials.
Create React App (CRA) was a command-line tool that generated a ready-to-use React project with Webpack, Babel and testing set up for you. For years it was the standard way to start. You ran npx create-react-app my-app and got a working project without configuring a bundler.
The React team officially deprecated Create React App in early 2025, and it no longer receives updates. It does not support new React features well, its dependencies grow outdated, and its setup is slow on larger projects. Many older tutorials still use it, so you will see it often. Do not start new projects with it.
Vite (French for "fast", pronounced like "veet") is a build tool created by Evan You. It has two main parts.
When you save a file, Vite updates the browser through hot module replacement (HMR). Your component refreshes and, in most cases, keeps its state, so the feedback loop is very short.
Creating a React project:
For TypeScript, use --template react-ts. The result is a small project you can read in a few minutes.
| Topic | Create React App | Vite |
|---|---|---|
| Status | Deprecated, not maintained | Actively maintained |
| Dev server start | Bundles first, slows as the app grows | Starts fast with native ES modules |
| Hot reload | Slower on large apps | Fast HMR |
| Configuration | Hidden, ejecting needed to change | Visible vite.config.js, easy to extend |
| Production build | Webpack | Rollup-based bundling (newer Vite versions are moving to a Rust-based bundler) |
| Environment variables | Prefix REACT_APP_ | Prefix VITE_, read with import.meta.env |
| Entry file | index.js | main.jsx or main.tsx |
| TypeScript | Supported through a template | Supported through a template |
Variables that start with VITE_ are exposed to your browser code. Define them in a .env file:
Read them in code:
Anything exposed this way is visible to every visitor, so never put secret keys in a VITE_ variable. This replaces the old process.env.REACT_APP_... pattern from Create React App.
Vite gives you a client-side single-page app. It does not include routing, server rendering or data loading. If you need those from day one, such as server rendering for search engines or a full-stack structure, the React documentation points to frameworks like Next.js or React Router. A common path is to learn React with Vite, then move to a framework when the project needs one.
Other build tools exist, such as Parcel, Rspack and Turbopack. Vite is a good default for learning because the project is small and nothing is hidden.
If you inherit a CRA project, a basic migration to Vite usually means:
src and public assets.public/index.html to the project root and add a script tag pointing to your entry file..js files that contain JSX to .jsx, because Vite expects that extension.process.env.REACT_APP_* with import.meta.env.VITE_*.It still runs, but it is unmaintained, so it gets no fixes or support for new React versions. Use Vite or a framework for new work.
No. Vite also supports Vue, Svelte, Solid, plain JavaScript and more through templates and plugins.
No, it is a build tool and development server. It does not provide routing or server rendering by itself.
It does not bundle your whole app before serving. The browser loads source files as ES modules, and Vite transforms only the files requested.
Create React App is deprecated, so new projects should use Vite or a React framework. Vite gives a quick development server, fast hot reloading and a clean, visible configuration. Remember the VITE_ prefix for environment variables, keep secrets out of browser code, and move to a framework when you need routing and server rendering.