Skip to content

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

Open
@juliushuck

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions