ericclemmons / ericclemmons/react-resolver
Avoid setState on unmounted components
- 主要言語
- JavaScript
- スター
- 1.6k
- フォーク
- 52
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、react-router の権限リダイレクト中における Resolver コンポーネントの非同期更新を追跡し、両方の警告を再現してください。要件が不足している場合のリダイレクトで、どちらの setState 警告も発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100