How to get TRPC mutation type?

Does anyone know how to get the useMutation return type for a TRPC mutation? I want to pass a mutation down as props but cannot get the types working
const mutationResult = api.myRouter.createPost.useMutation() // What type is this?

// Type error
return <Child mutationResult={mutationResult} />
const mutationResult = api.myRouter.createPost.useMutation() // What type is this?

// Type error
return <Child mutationResult={mutationResult} />
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server