Skip to content

Warning due to using setState within useEffect #5

@zmaupin

Description

@zmaupin

Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.

Here is my test app:
https://github.com/zmaupin/my-app-graphql

Can you point out what I'm doing wrong here? I imagine this works for you and I did something wrong.

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