Skip to content

Avoid setState on unmounted components #97

@srph

Description

@srph

So, I'm using react-resolver with react-router for permissions. So, if a user doesn't pass a certain requirement, they're redirected somewhere. This means that I don't really want to put something to the props.

I just want to avoid errors such as these:

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Resolver component.
Warning: setState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions