AnteG
[SOLVED] Solid Router v11 + TanStack Query issue
I'm migrating my app's solid router from v0.8 to v0.11 (currently the latest version). I'm having a problem making it work together with TanStack Query. Previously, I had my TanStack Query calls inside of route data functions. Now, when migrated to the load functions, when I hover over the component that sends you to the next route, I get the error from TanStack Query: "No QueryClient set, use QueryClientProvider to set one". It seems that TanStack Query is not initialized in the load function. I've also tried wrapping the Routes component with the client provider, but I get the same error.
Thanks to all for reading! If anyone has any suggestions regarding this issue, I'd appreciate it.
App + Router component:
routes.ts in short:
UserData:
5 replies