diff --git a/packages/vike-react-query/renderer/StreamedHydration.tsx b/packages/vike-react-query/renderer/StreamedHydration.tsx
index b828ad57..49f70531 100644
--- a/packages/vike-react-query/renderer/StreamedHydration.tsx
+++ b/packages/vike-react-query/renderer/StreamedHydration.tsx
@@ -3,6 +3,7 @@ export { StreamedHydration }
import type { QueryClient } from '@tanstack/react-query'
import { dehydrate, hydrate, DehydratedState } from '@tanstack/react-query'
import { uneval } from 'devalue'
+import type { ReactNode } from 'react'
import { useStream } from 'react-streaming'
declare global {
@@ -18,7 +19,7 @@ declare global {
* - hydrating the query client on the client
* - if react-streaming is not used, it doesn't do anything
*/
-function StreamedHydration({ client }: { client: QueryClient }) {
+function StreamedHydration({ client, children }: { client: QueryClient; children: ReactNode }) {
const stream = useStream()
if (import.meta.env.SSR && stream) {
@@ -48,5 +49,5 @@ function StreamedHydration({ client }: { client: QueryClient }) {
}
window._rqd_ = { push: onEntry }
}
- return null
+ return children
}
diff --git a/packages/vike-react-query/renderer/VikeReactQueryWrapper.tsx b/packages/vike-react-query/renderer/VikeReactQueryWrapper.tsx
index a0910e2e..c0d8151b 100644
--- a/packages/vike-react-query/renderer/VikeReactQueryWrapper.tsx
+++ b/packages/vike-react-query/renderer/VikeReactQueryWrapper.tsx
@@ -20,12 +20,11 @@ export default function VikeReactQueryWrapper({ pageContext, children }: VikeRea
const queryClient = __queryClientGlobal ?? new QueryClient(queryClientConfig)
return (
- <>
-
-
- {children}
-
- >
+
+
+ {children}
+
+
)
}