You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TanStack Query illustrates this so well. It does not need a special "RSC mode". Once the RSC payload is part of an async query, you still get explicit cache keys, `staleTime`, background refetching, and the rest of Query's toolbox. For static content, just set `staleTime: Infinity` and you are done.
returnrenderToReadableStream(<h1>Hello from the server</h1>)
124
133
})
@@ -224,17 +233,19 @@ That is the tradeoff:
224
233
225
234
That is why we think they matter. Not because every route should become a server component. Because when you use them where they fit, the payoff is measurable and not subtle.
226
235
227
-
## Introducing Composite Components, the anti-`'use client'`
236
+
## Introducing Composite Components
228
237
229
238
Everything above stands on its own. If all TanStack Start did was treat RSCs as fetchable, cacheable, renderable data, we would already think that was a better foundation for RSCs.
230
239
231
240
But we kept pulling on one question: what if the server did not need to decide every client-shaped part of the UI at all?
232
241
233
242
That led us to create something entirely new: **Composite Components**.
234
243
235
-
`use client` still works the same way in TanStack Start when the server intentionally wants to render a client component. `use server` does not. Start uses explicit [Server Functions](/start/latest/docs/framework/react/guide/server-functions) instead. Composite Components are not a replacement for `use client`. They are the opposite case: the server can leave join points for client UI without needing to know what goes there, while the client still owns the tree and composition.
244
+
`use client` still works the same way in TanStack Start when the server intentionally wants to render a client component. `use server` does not. Start uses explicit [Server Functions](/start/latest/docs/framework/react/guide/server-functions) instead.
245
+
246
+
Composite Components are not a replacement for `use client`. They solve a similar composition problem from the opposite direction. Instead of the server deciding which client component renders where, the server can leave join points open and let the client own the tree and decide what fills them.
236
247
237
-
That is the part that feels genuinely new to us. Most RSC systems let the server decide where client components render. Composite Components let the server leave that decision open.
0 commit comments