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
{{ message }}
Repository navigation
Potential state inconsistency in Transition when used with TransitionGroup #921
An (removed) Transition's state may stuck in entering after being removed from TransitionGroup. Unfortunately I've not managed to produce a easy-to-ready MVP. For reproducing, check the end of this issue.
Curiously, it seems that the root cause is that the Transition's componentDidUpdate hook's prevProps is changed without the hook being called, either by someone updating the props object directly, or by React somehow missing a render. The problem is that the in prop of this Transition is managed by TransitionGroup, so each update to the in prop should definitely cause (at least) one componentDidUpdate call.
If we add a log at the start of componentDidUpdate (for convenience, I directly edited the compiled version):
We can see that the Transition is at entering, with prevProps === this.props, but this.props.in === false.
I've failed to reproduce this bug in a simplified setting. So this issue may be related to the upper levels of the component tree, and how they manage the tree. So for context, other components that I think might be involved:
React version: 18.3.1
Mobx: Using react integration, 7.6.0
React-router-dom: Router used, but no Route in upper levels. 6.30.1
Activity