Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not pass mutation of useAuthSignOut as dependencies of useEffect #91

Open
juliushuck opened this issue Jul 13, 2023 · 0 comments
Open

Comments

@juliushuck
Copy link

I want to do this:

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant