Skip to content

Docs need clarity around useMutation and Typescript #1887

@shamilovtim

Description

@shamilovtim

Describe the bug
Using useMutation as-is without a generic throws errors in Typescript. There are no docs that explain how to useMutation with Typescript and the type definitions aren't clear enough.

To Reproduce
Steps to reproduce the behavior:

  1. useMutation without a generic
  2. type errors will present themselves
  3. https://react-query.tanstack.com/typescript#_top has no docs on useMutation

Expected behavior
Expectation would be that there are docs on how to type useMutation and that it doesn't need to be ts-ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions