I'm trying to use React's low level API for animations (i.e ReactTransitionGroup) with React Router so I can animate transitions using requestAnimationFrame as opposed to CSS. Does anyone know how to get the special lifecycle hooks to be called on the component associated with each route?
I've tried wrapping the RouteHandler component inside ReactTransitionGroup but the 'componentWillLeave' event of the current route's component doesn't fire when changing routes.
<ReactTransitionGroup component="div">
<RouteHandler key={name}/>
</ReactTransitionGroup>
Here's a JSFiddle that illustrates my problem: http://jsfiddle.net/d2mnwqLj/3/