ReactCSSTransitionGroup を統合しましたが、アニメーション効果が得られません。次の構造が間違っている場所に関するヒントをいただければ幸いです。
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import ReactCSSTransitionGroup = require('react-addons-css-transition-group')
...
return (
...
<ReactCSSTransitionGroup
transitionName = "mainpage"
transitionEnterTimeout={ 500 }
transitionLeaveTimeout={ 300 }>
<Router key="router" history={ browserHistory }>
<Route key="/" path="/" component={ App }>
<IndexRoute key="MainTiles" component={ MainTiles } />
<Route key="Page1" path="page1" component={ Page1 } />
</Route>
</Router>
</ReactCSSTransitionGroup>
...
)
私のcssは次のとおりです。
.mainpage-enter { opacity: 0; transition: opacity 100ms ease-in; }
.mainpage-enter.mainpage-enter-active { opacity: 1; transition: opacity 100ms ease-in; }
.mainpage-leave { opacity: 1; transition: opacity 100ms ease-in; }
.mainpage-leave.mainpage-leave-active { opacity: 0; transition: opacity 100ms ease-in; }