useMutation()
note
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on mutations.
Works like react-query's mutations - see their docs.
Example
Backend code
server/routers/_app.tstsx
server/routers/_app.tstsx
tsx
tsx