Portofolio ©2026Memuat pengalaman
Rancang.Bangun.Rilis.
Laravel × React × WebGL000
tubagus
Bahasa IndonesiaEnglish
← Semua catatan

Moving from Next.js to TanStack Start: honest notes

Type-safe routing, clearer loaders, and the few things I still miss.

Ditulis oleh

TubagusFull Stack Developer

Terbit

Waktu baca

5 menit

A glass plate etched with branching paths, one route lit in lime from start to finish

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

  1. Image optimization out of the box.
  2. A larger ecosystem of examples.
  3. 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.

Ditulis oleh

Tubagus

Full Stack Developer

Bagikan catatan ini

Baca juga

Catatan berikutnya

Motion with a reason→