useFocusNotifyOnChangeProps hook notifyOnChangeProps type issue
Hello!
I use v5.17.7 React-query with react native. I want to use the useFocusNotifyOnChangeProps hook like the docs said. ( https://tanstack.com/query/latest/docs/framework/react/react-native#disable-re-renders-on-out-of-focus-screens )
But I got type issue and dont know how to fix that. Do you have any idea how to fix that?
Thank you

4 Replies
ratty-blush•16mo ago
please show a typescript playground
solid-orangeOP•16mo ago
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
ratty-blush•16mo ago
thx. we haven an open PR to fix this:
https://github.com/TanStack/query/pull/7441
GitHub
fix(query-core): allow function value of
notifyOnChangeProps
quer...undefined is a valid return value for the function value of notifyOnChangeProps. See linked issue for more details.
Fixes #7426.
solid-orangeOP•16mo ago
Thank you ! :reactcharts: