MediumEcosystem📖 Theory Question

What are the key differences between Vite and Create React App?

💡

Hint

Vite uses native ES modules in dev — instant server start vs CRA's webpack bundle

Full Answer

CRA (Create React App) is largely deprecated. Vite is the modern standard for React projects.

Create React AppVite
Dev server start30-60s (bundles everything)<300ms (no bundling)
HMR (hot reload)Slow (rebundles)Instant (native ESM)
Build toolwebpackRollup (prod), esbuild (dev)
ConfigEjection requiredvite.config.ts
MaintenanceUnmaintainedActively maintained
// Vite dev — serves files directly as ES modules
// Browser requests /src/App.tsx → Vite transforms just that file → instant

// CRA dev — bundles ALL files on start, then watches
// Every change → re-bundle affected module graph → slow

// Starting a new project
npm create vite@latest my-app -- --template react-ts
# vs
npx create-react-app my-app --template typescript  # avoid

Alternatives for production apps:

  • Next.js — SSR, SSG, RSC, file-based routing
  • Remix — full-stack, nested routing, web standards
  • Vite + React Router — SPA with full control
💡 The React team no longer recommends CRA. Their official docs point to Next.js, Remix, or Vite as starting points depending on your needs.

Practice this in a timed sprint →

5 free questions, no signup required

⚡ Start Sprint