score:4

Accepted answer

OK. After wading through a lot of latest as well as outdated docs, I managed to work this out. Here is the solution

Basically, react-router concerns itself only with the animation of parent container. But that means that using ReactTransitionGroup, we could hook into componentWillLeave method in the exiting component, where we can make individual children manipulate. Thus, changing a page would automatically animate the children through the hook.

The setTimeout in the solution may seem like a hack, but that's all I have been able to do for now.


Related Query

More Query from same tag