File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,9 @@ Streams are universal. They work with:
162162- ** TanStack Query** → Cache server components, refetch in the background, deduplicate requests
163163- ** TanStack DB** (coming soon) → Sync server component state, offline support, optimistic updates
164164
165+ ### In a route loader
166+
165167``` tsx
166- // In a route loader
167168export const Route = createFileRoute (' /posts/$postId' )({
168169 loader : async ({ params }) => ({
169170 Post: await getPost ({ data: { postId: params .postId } }),
@@ -182,8 +183,9 @@ function PostPage() {
182183}
183184```
184185
186+ ### With Query caching
187+
185188``` tsx
186- // With Query caching
187189const { data : Layout } = useQuery ({
188190 queryKey: [' layout' ],
189191 queryFn : () => getLayout (),
You can’t perform that action at this time.
0 commit comments