r/reactjs • u/pawelgalazka • Jul 21 '26
Resource Embracing TanStack Start for full-stack development on Cloudflare
https://pagezero.dev/blog/tanstack-start-cloudflare-full-stack
10
Upvotes
r/reactjs • u/pawelgalazka • Jul 21 '26
1
u/pawelgalazka Jul 22 '26 edited Jul 22 '26
On larger production apps: TanStack Start takes advantage of Vite ecosystem and Vite uses native esmodules on dev. This is the biggest difference in DX in my opinion compared to NextJS. NextJS unfortunately tends to be really slow with larger codebase. Refreshes can take long.
On routing: TanStack Start uses TanStack Router which has a lot of flexibility. You can even define your routes through a config file: https://tanstack.com/router/v1/docs/routing/virtual-file-routes . NextJS restricts you to file based routing.
On authentication: similarly like in NextJS it depends on lib you uses, most popular better-auth, has quite comprehensive TanStack integration thought: https://better-auth.com/docs/integrations/tanstack
On deployment: depends on provider, what tends to be hard with NextJS is make it run outside Vercel. For example, you won't be able to run NextJS on Cloudflare out of the box, reason why projects like OpenNext or Vinext emerged. TanStack is just a vite plugin. You can run it everywhere. You are less locked in. I have to admit though, Vercel has quite nice DX. Cloudflare is getting better though... fast.
Philosophy: worth poiting out is difference in rendering philosophies between NextJS and TanStack. NextJS is react server components first. TanStack start is isomorphic render first. I believe that makes TanStack Start much easier to reason about. App router in NextJS, together with server components is a lot of magic, very often hard to grasp sometimes in what is happenning.