How can I change transitions with react-transition-group (2.4.0, if it matters)?
I currently have the following structure (with react-router)
<CSSTransition key={x} timeout={100} classNames={transition}>
<Switch>
<Route render={() => <span>foo</span>}/>
<Route render={() => <span>bar</span>}/>
</Switch>
</CSSTransition>
It works fine with a fixed classNames
, except I would like some pages to have a different transition.
If I just change the classNames
of the CSSTransition
, it seems like it corrupts the state, it ends up putting the -enter-done
class of the new animation, but the -enter
class of the old one still remains.