tRPCttRPC
Powered by
MozziusM
tRPC•3y 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
Expo + trpc +_ reactQuery: Uncaught Error: No QueryClient set, use ...
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,
});
import { defaultContext } from "@tanstack/react-query"

export const api = createTRPCReact<AppRouter>({
  reactQueryContext: defaultContext,
});
Jump to solution
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error: No QueryClient set, use QueryClientProvider to set one
welpWwelp / ❓-help
3y ago
trpc + expo react native issue
SonSSon / ❓-help
4y ago
Nextjs, Expo react native, Trpc Help
GeekydevGGeekydev / ❓-help
7mo ago