We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 677888d commit 1201f32Copy full SHA for 1201f32
1 file changed
src/blog/composite-components.md
@@ -162,8 +162,9 @@ Streams are universal. They work with:
162
- **TanStack Query** → Cache server components, refetch in the background, deduplicate requests
163
- **TanStack DB** (coming soon) → Sync server component state, offline support, optimistic updates
164
165
+### In a route loader
166
+
167
```tsx
-// In a route loader
168
export const Route = createFileRoute('/posts/$postId')({
169
loader: async ({ params }) => ({
170
Post: await getPost({ data: { postId: params.postId } }),
@@ -182,8 +183,9 @@ function PostPage() {
182
183
}
184
```
185
186
+### With Query caching
187
188
-// With Query caching
189
const { data: Layout } = useQuery({
190
queryKey: ['layout'],
191
queryFn: () => getLayout(),
0 commit comments