Skip to content

useEffect loop #4

Description

@mcbba

Line 13 of app.jsx:

useEffect(() => {
getDoc(user).then((doc) => {
setTODO(doc.data().todos);
});
}, [user]);

This causes an infinite loop of requests to the firestore database, racking up about 50,000 requests an hour. Is there a good method for allowing useEffect to render setTODO without this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions