MozziusM
tRPC3y ago
5 replies
Mozzius

React Native/Expo: Uncaught Error: No QueryClient set, use QueryClientProvider to set one

Found this issue but it just says to use patch-package, I was wondering if there was any changes since then?
https://github.com/TanStack/query/discussions/4619
GitHub
Describe the bug I decided to use expo + trpc stack. But I have some issues with react-query used under the hood of trpc. The courios thing is that iOS build is working fine but not web configurati...
Expo + trpc +_ reactQuery: Uncaught Error: No QueryClient set, use ...
Solution
import { defaultContext } from "@tanstack/react-query"

export const api = createTRPCReact<AppRouter>({
  reactQueryContext: defaultContext,
});
Was this page helpful?