HeadlinesBriefing favicon HeadlinesBriefing.com

TanStack Start Adds React Server Components Support

Hacker News •
×

TanStack Start has added native support for React Server Components (RSCs), marking a significant evolution in the framework's capabilities. The team at TanStack, led by Manuel Schiller, Tanner Linsley, and Jack Herrington, has taken a distinctive approach to RSCs that treats them as first-class citizens while maintaining the framework's core philosophy of flexibility and developer control.

Unlike other frameworks that impose strict conventions around RSCs, TanStack Start treats them as streams of data that developers can fetch, cache, and render on their terms. This means RSCs can be created from anywhere on the server - server functions, API routes - and decoded wherever needed, both during server-side rendering and on the client. The framework's approach eliminates the need for special RSC modes or black-box conventions, making them behave more like any other piece of server data.

The implementation leverages React Flight streams, with a minimal API surface that includes renderToReadableStream for server-side rendering and createFromReadableStream for client-side decoding. This design philosophy extends to caching as well, where RSCs integrate seamlessly with existing caching strategies rather than requiring novel approaches. The framework's existing tools like TanStack Query and TanStack Router work naturally with RSCs, providing fine-grained control over caching and route-based optimization without additional complexity.