tRPCttRPC
Powered by
MugetsuM
tRPC•3w ago•
3 replies
Mugetsu

abortOnUnmount old Query vs new Query

@trpc/next@trpc/client@trpc/react
Im moving to the recommmended queryOptions things.
Is there a global abortOnUnmount option in this setup??

On the old one I just did in the reactclient creation

//old
export const api = createTRPCReact<AppRouter>({ abortOnUnmount: false });

//new
export const apiNew = createTRPCOptionsProxy<AppRouter>({
  client: trpcClient,
  queryClient: getQueryClient(),
});
//old
export const api = createTRPCReact<AppRouter>({ abortOnUnmount: false });

//new
export const apiNew = createTRPCOptionsProxy<AppRouter>({
  client: trpcClient,
  queryClient: getQueryClient(),
});
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

abortOnUnmount config error
bigtechguyBbigtechguy / ❓-help
4y ago
How to use querykeys from react-query
DR33MDDR33M / ❓-help
3y ago
useQuery returning old data with new params
uzelacUuzelac / ❓-help
3y ago
TypeError Cannot destructure property 'abortOnUnmount' of 'useContext(...)' as it is null.
TheGoatedDevTTheGoatedDev / ❓-help
4y ago