Describe the bug#
Subscribers to the FocusManager will get called each time there is a visibility change of the window. The docs specify that each subscriber's handler will be called with a boolean argument, indicating whether the window is active. However, in reality, no arguments get passed to the event handlers.
Either the docs or the code should be updated to ensure consistency, where the latter would be preferred. Having the visibility boolean passed down would actually be quite handy.
Your minimal, reproducible example#
https://stackblitz.com/edit/tanstack-query-s7brmc?file=src%2Findex.jsx
Steps to reproduce#
Checkout out the official example in the docs here.
And compare with the output on screen of the linked Stackblitz example.
Expected behavior#
I would expect the docs either to reflect the actual behavior or the code to reflect the example in the docs.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
- OS: MacOS
- Browser: Chrome
- Version: 121.0.6167.184
Tanstack Query adapter#
react-query
TanStack Query version#
v5.17.19
TypeScript version#
v5.3.3
Additional context#
No response
I can create a PR for this if desired?