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:
No replies yet
Join the Discord to continue the conversation
t
tRPC
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.