Oozhaa
Oozhaa

Reputation: 181

React TransitionGroup componentWillLeave no action

I have strange problem with TransitionGroup in React. First time somehow I managed to create group and component that stucks and doesn't update based on state values.

Have one component(A) that always has TransitionGroup. When state changes it rerenders itself. In TransitionGroup I add/remove other Components(B) (yes they have unique keys). in component B i have function componentWillLeave which just calls to callback as I don't want to perform any animations on leave. And these damn B components stays in my component A! But if i do setTimeout() in componentWillLeave function for 10ms it detaches properly. May anyone has idea why this happens or had same issue?

Thanks,

T

Upvotes: 0

Views: 606

Answers (1)

Oozhaa
Oozhaa

Reputation: 181

It is well known problem with TransitionGroup and CSSTransitionGroup, more discussion is here - https://github.com/facebook/react/issues/1326#issuecomment-135577995. will be fixed in 0.14 release.

Upvotes: 1

Related Questions