Replies: 1 comment
-
Hi, I'm not sure but the docs seem to suggest you can't:
Could you use https://tanstack.com/query/latest/docs/framework/svelte/ssr#using-prefetchquery |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can I prefetch queries in svelte kit?
The first issue i faced is passing the queryClient from +page.server.ts like this;
but I get this error from sveltekit "Cannot stringify arbitrary non-POJOs (data.queryClient)" so I have to create the client in the page component...
My plan was to use it in another +page.server.ts like this;
but since i cannot pass the queryClient i can't do that, and if I pass the client in the component i can't access in in the second +page.server.ts to prefetch.
any help with this would be appreciated, thanks.
Beta Was this translation helpful? Give feedback.
All reactions