This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the warning for setState on unmounted components (#323)
Consistent with upstream React, we should remove the error message when you setState on an unmounted component. In summary, while it can warn on potential memory leaks, false positives is common and can push people to undesirable workarounds: function TestComponent:didMount() testPromise():andThen(function(newState) -- Component might unmount before our promise resolves self:setState(newState) end) end For the full reasoning behind removing the warning, see Dan Abramov's PR: facebook/react#22114
- Loading branch information
1 parent
0f26436
commit 2239e01
Showing
4 changed files
with
8 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters