t
tRPC
Callbacks in Consecutive Mutations - tRPC
F
tRPC
•
3y ago
•
1 reply
francistogram
Callbacks in Consecutive Mutations
I seem to be running into this issue
https://tanstack.com/query/v4/docs/react/guides/mutations#consecutive-mutations
using
.useMutation
.useMutation
and only the last callback is fired
Is there any way around this with TRPC since I assume it
's actually a wrapper around
mutate
mutate
instead of
.useMutation
.useMutation
?
Mutations | TanStack Query Docs
Unlike queries
, mutations are typically used to create
/update
/delete data or perform server side
-effects
. For this purpose
, TanStack Query exports a useMutation hook
.
Here
's an example of a mutation that adds a new todo to the server
:
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Does SSG / ServerSideHelpers allow for mutations in getServerSideProps Nextjs ?
D
dragonpope / ❓-help
3y ago
tRPC 10 Mutations Firing Twice in Deployed Releases Only
N
Nick / ❓-help
3y ago
Mutations and Queries in React Contexts causing unexpected behaviors
N
Nick / ❓-help
3y ago
Server freezes when doing mutations...
X
xpru67 / ❓-help
3y ago