query icon indicating copy to clipboard operation
query copied to clipboard

useMutation Docs indicate queryClient is an option in 1 place but not another, and not in the typescript

Open onionhammer opened this issue 1 year ago • 1 comments

Describe the bug

The documents indicate you can pass queryClient in the options passed to useMutation, but using 5.52.1, the typescript does not recognize that option.

https://tanstack.com/query/latest/docs/framework/react/reference/useMutation

In the list, 'queryClient' is not present, but it is the last option listed when you scroll down the page.

queryClient?: QueryClient, Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.

Your minimal, reproducible example

N/A

Steps to reproduce

N/A

Expected behavior

queryClient should be passable

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

N/A

Tanstack Query adapter

None

TanStack Query version

5.52.1

TypeScript version

N/A

Additional context

N/A

onionhammer avatar Aug 23 '24 16:08 onionhammer

queryClient is not an option, but can be passed as the second argument. Please make a PR to fix the docs.

TkDodo avatar Aug 23 '24 16:08 TkDodo

@TkDodo I think this could be closed. Thanks for your approval 😄

baeharam avatar Sep 21 '24 14:09 baeharam