tRPCttRPC
Powered by
NickN
tRPC•3y ago•
12 replies
Nick

Mutations and Queries in React Contexts causing unexpected behaviors

In my organization, we recently moved to put all of our mutations/queries into React Contexts and out of components (NextJS with React 18). I am now seeing requests and debouncing behaviors that used to work no longer work.

In some cases it appears we now have race conditions as loading/success are not necessarily being handled, but in other cases we're not getting reactivity from mutations that are in contexts

Anyone else have experience or tips re: throwing tRPC stuff into React Contexts?
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

queries and mutations has wrong response type in client ( monorepo )
AmirrezaAAmirreza / ❓-help
2y ago
Help with queries vs mutations
CliffCCliff / ❓-help
3y ago
How do I get the queries and mutations list in v10?
LeeLLee / ❓-help
3y ago