Add failing test case demonstraiting bad setState() call. - #12
Merged
Conversation
Owner
|
Can you resolve these conflicts then let me know if the latest changes around setState() have fixed this issue in v1.0.3? The following lines address issue #9 Don't set state after async success and error |
This failing test case reproduces the error I reported in sheaivey#9. The logic error is that the debounce will call the wrapped function and the wrapped function does not check if the component has been unmounted in the meantime.
binki
force-pushed
the
test-unmounted-setstate
branch
from
August 1, 2017 01:13
65a5d7a to
8d9bf0f
Compare
Contributor
Author
|
@sheaivey I rebased and it looks like it’s passing at least the tests I added for the PR. Thanks! |
Owner
|
Great, thanks for the contribution! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This failing test case reproduces the error I reported in #9.
The logic error is that the debounce will call the wrapped function
and the wrapped function does not check if the component has been
unmounted in the meantime.
This is the repro for #9. The test is expected to fail, as I have not attempted to fix the issue. Please let me know if this repro makes the issue I reported in #9 clear or not.