Moving from Next.js to TanStack Start: honest notes
Type-safe routing, clearer loaders, and the few things I still miss.
Written by
TubagusFull Stack Developer
Published
Reading
5 min
Topics
Frontend · #React · #TanStack · #TypeScript

I moved this very site from Next.js to TanStack Start. Here is what changed, honestly.
What I gained
Type-safe routing. Params, search params and loader data are all inferred. Typos in a to="/projcts" fail the build instead of a user.
Loaders that compose with TanStack Query. One queryOptions definition is used by both the loader and the component:
export const noteQuery = (slug: string) =>
queryOptions({
queryKey: ['notes', slug],
queryFn: () => apiGet(`/notes/${slug}`, NoteDetailSchema),
})
The loader calls ensureQueryData, the component calls useSuspenseQuery, and the cache handles the rest.
What I miss
- Image optimization out of the box.
- A larger ecosystem of examples.
- ISR — though for a portfolio, static prerendering covers it.
Verdict
For an app where I care about the data layer, TanStack Start wins. For a pure marketing site, either is fine.
Keep reading
FrontendOne schema, two runtimes: API contracts with Zod
Treating the Laravel resource as a contract and letting the frontend refuse anything that breaks it.
6 min read
FrontendWebGL on a performance budget
Rendering on demand, pausing off-screen and other ways to keep a 3D hero from cooking laptops.
8 min read
BackendLaravel queues that don't wake you up at 3am
Idempotent jobs, sane retries and the Horizon settings I now copy into every project.
6 min read
Next note
Motion with a reason→