query icon indicating copy to clipboard operation
query copied to clipboard

Docs: QueryCache - incorrect statements about `defaultOptions` callbacks

Open swingthrough opened this issue 1 year ago • 1 comments

Describe the bug

The docs for the latest version state the following:

Global callbacks The onError, onSuccess and onSettled callbacks on the QueryCache can be used to handle these events on a global level. They are different to defaultOptions provided to the QueryClient because:

  • defaultOptions can be overridden by each Query - the global callbacks will always be called.
  • defaultOptions callbacks will be called once for each Observer, while the global callbacks will only be called once per Query.

Statements about defaultOptions are incorrect since in v5 (currently latest) there is no longer the possibility to define those callbacks there.

Your minimal, reproducible example

--

Steps to reproduce

--

Expected behavior

--

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

--

Tanstack Query adapter

None

TanStack Query version

v5

TypeScript version

No response

Additional context

No response

swingthrough avatar Feb 03 '24 16:02 swingthrough

you're right. please file a PR that removes this section

TkDodo avatar Feb 13 '24 14:02 TkDodo