-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[react-test-renderer] componentWillUnmount is not called for inner component instance #8459
Comments
Ah, unmountComponent in ReactTestRenderer needs to call this.unmountChildren. |
I can take a look at this |
gre
added a commit
to gre/react
that referenced
this issue
Dec 7, 2016
gre
added a commit
to gre/react
that referenced
this issue
Dec 7, 2016
This PR should fix it. I also added a test so there is no regression on this. |
aweary
pushed a commit
that referenced
this issue
Dec 14, 2016
bvaughn
pushed a commit
that referenced
this issue
Mar 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
bug
What is the current behavior?
componentWillUnmount for inner instances is never called.
Here are 2 (jest) tests, the first works, not the second.
What is the expected behavior?
The two test above should pass. All component that are unmounted should have the proper lifecycle, whatever the nesting is.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 15.4.0
The text was updated successfully, but these errors were encountered: