feat: ReactQueryStreamedHydration

This commit is contained in:
ner committed 2024-10-29 09:33:42 +02:00
1 parent 0e146b0c53
commit e9c0f3bef3
12 files changed
+71 -52

No files matched your search

+4 -3
View File
@@ -1,4 +1,5 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental';
import { Metadata } from 'next';
import UsersList from '@/components/UsersLists';
@@ -20,13 +21,13 @@ const WatchList = async () => {
const showType = 'movie';
if (session) {
await queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session }));
queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session }));
}
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<ReactQueryStreamedHydration>
<UsersList session={session} list={list} label='watch' />
</HydrationBoundary>
</ReactQueryStreamedHydration>
);
};