You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repro: https://jsfiddle.net/5t5ua47c/
In the example, a click handler in the subtree queues an update for both the the subtree and parent components, with the following ordering of lifecycle methods:
parent will update
> child will update
>> subtree will update
> child did update
parent did update
>> subtree did update
If the parent component unmounts the subtree in componentDidUpdate this will cause the subtree to be unmounted by the time that its componentDidUpdate method is called (https://jsfiddle.net/v5fk4xvx/1/):
parent will update
> child will update
>> subtree will update
> child did update
parent did update (unmount subtree)
>> subtree will unmount
>> subtree did update
What is the expected behavior?
Probably this:
parent will update
> child will update
>> subtree will update
> child did update
>> subtree did update
parent did update
The text was updated successfully, but these errors were encountered:
This looks like a bug to me. I'm not sure it's high priority since we're concentrating on Fiber now (#6170) but it would be great if you could turn this into a failing test case.
Repro: https://jsfiddle.net/5t5ua47c/
In the example, a click handler in the subtree queues an update for both the the subtree and parent components, with the following ordering of lifecycle methods:
If the parent component unmounts the subtree in
componentDidUpdate
this will cause the subtree to be unmounted by the time that itscomponentDidUpdate
method is called (https://jsfiddle.net/v5fk4xvx/1/):What is the expected behavior?
Probably this:
The text was updated successfully, but these errors were encountered: