YahooArchive / fluxible-router

MOVED TO FLUXIBLE REPO
104 stars 26 forks source link

Animations #43

Closed ladas-larry closed 9 years ago

ladas-larry commented 9 years ago

There should be some convenient way how to create animations before and after route transition.

gpbl commented 9 years ago

An option could be React.addons.CSSTransitionGroup. In your root component (where you are rendering the route handler), make sure you give an unique key to the handler:

render() {
  return (
    <ReactCSSTransitionGroup transitionName="myTransition">
       <Handler key={this.props.currentRoute.get("url")} />
    </ReactCSSTransitionGroup>
  );
}