invertase / invertase/tanstack-query-firebase
Can not pass mutation of useAuthSignOut as dependencies of useEffect
Open
react-query-firebase
- Dominant language
- TypeScript
- Stars
- 462
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
I want to do this:
```js
const mutation = useAuthSignOut(firebaseAuth);
useEffect(() => {
mutation.mutate();
}, [mutation]); // Can not pass in mutation as a dependency
```
But when I do so, the page freezes.
I have to remove it from the dependencies array to make it work. Why is that?
Contributor guide
Assessment
This issue has not been assessed yet.