Describe the bug
if a dependency is used as !! myDependency in the key, missing dependency error is triggered.
Steps to reproduce
const useFoo = ({myNonSerializableDep}) => {
return useQuery({
// ESLint: The following dependencies are missing in your queryKey: myNonSerializableDep(@tanstack/query/exhaustive-deps)
queryKey: ['foo', !!myNonSerializableDep], // <= get the error on this line
})
}
Expected behavior
there should be no error
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
MacOS
react-query version
4.14.1
TypeScript version
4.8.3
Additional context
No response