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.
Next note
Motion with a reason→