Next.js or Vite — what to pick for your first React project

You've decided to build with React, opened the docs — and the very first question stalls you: start with Vite, or go straight to Next.js? The promises sound alike, both are popular, both are "modern."
The trick is that this isn't a choice between two Reacts. React is the same in both; components are written identically. What you're actually choosing is who assembles your page — the user's browser, or a server before the page ships. Everything else follows from that one difference: SEO, hosting, cost, learning curve.
What happens when someone opens your site
Vite builds your project into a set of static files. The user gets a nearly empty index.html — one empty container and a script tag. Then the JavaScript downloads, React starts, and draws the entire page inside the browser. That approach is called an SPA, a single-page application.
Next.js goes the other way. The server draws the page: it runs your React ahead of time and hands the browser finished HTML with text, headings and images already in it. JavaScript arrives afterwards and brings the buttons to life.
Both are fine. One ships a box of parts with instructions; the other ships an assembled wardrobe.
The comparison that matters
| Criterion | Vite (SPA) | Next.js | |-----------|-----------|---------| | What the browser receives | Empty shell + script | Finished HTML | | Needs a server | No, static files only | Yes, Node runtime or serverless | | Text visible to crawlers immediately | No, only after JS runs | Yes, right away | | Link preview card in messengers | Usually doesn't work | Works | | Backend in the same project | No, written separately | Yes, built in | | Learning curve | Lower: just React | Higher: rendering, caching, server components | | Hosting | Any static host, often free | A platform with a runtime | | Dev server startup | Instant | Fast |
SEO and previews — the underrated part
Here's the nasty surprise that makes people rebuild projects after launch.
The search-engine myth is overstated: Google today runs JavaScript and will, in most cases, see an SPA's content. Slower and more fragile than plain HTML, but it sees it. And if your app lives behind a login, none of this matters — no crawler is going in there anyway.
But almost nobody accounts for the second part: messenger and social bots generally don't run JavaScript at all. When someone drops a link to your project into a chat or a feed, the bot fetches raw HTML, looks for a title and an image — and in an SPA finds nothing. The link renders as a bare string with no preview. For a landing page, blog or shop that's lost traffic, and "but it works on my screen" doesn't fix it.
For more on how a crawler sees a page at all, see what is SEO.
Who should pick what
Straight answers, no "it depends."
Take Vite if:
- the project lives behind a login — admin panel, dashboard, editor, tracker, game. There's nothing to see from outside, so SEO is moot;
- you're learning React and don't want to absorb server components and caching in parallel. Fewer concepts, faster progress;
- you want free hosting: the
distfolder is ordinary static files, anyone will take it; - you already have a separate backend (a hosted database service, say).
Take Next.js if:
- the content must be visible from outside: landing page, blog, catalogue, shop;
- people will share links — you need proper previews;
- you want a backend in the same project: server routes sit beside the UI, keys never reach the browser;
- the project will clearly grow: retrofitting this later costs more than starting with it.
A one-question rule: "will anyone search for this or paste the link somewhere?" Yes — Next.js. No — Vite.
Can I move from Vite to Next.js later?
You can, and it isn't a rewrite: components move over nearly as-is. Two spots hurt — routing works differently, and any touch of browser-only things like window blows up during server rendering. If you suspect a move is coming, keep components "dumb" and data access in one layer; then the migration is boring.
The reverse works too: Next.js can build to static files if the server side turned out to be unnecessary.
What about create-react-app?
Don't use it — the tool is officially retired, and its documentation now just points at modern options. If you've opened a tutorial that starts with create-react-app, the whole tutorial is stale; find a newer one. If you're still unsure how React differs from plain markup, refresh with React or plain HTML.
And build speed?
Both tools rewrote their bundlers in Rust over the last few years: Turbopack for Next.js, Rolldown for Vite 8. So "builds are slow" isn't an argument for either one — it's a reason to update your version.
The AI Architect 2027 course: step by step from computer basics to your own app and first customers. 543 short lessons on your phone.





