ericclemmons / ericclemmons/react-resolver

Avoid setState on unmounted components

Open
#97 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.6k
Forks
52
PR merge metrics
No merged PRs in 30d

Description

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.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.