Just want to do a quick modal popout animation with react-transition-group
current behavior: https://codesandbox.io/s/525zj4vwrk
expected result: https://codesandbox.io/s/7m9721y03x
Similar code, but somehow the first one doesn't work?
Just want to do a quick modal popout animation with react-transition-group
current behavior: https://codesandbox.io/s/525zj4vwrk
expected result: https://codesandbox.io/s/7m9721y03x
Similar code, but somehow the first one doesn't work?
Just missing an unmountOnExit property.
<CSSTransition in={show} timeout={300} classNames="alert" unmountOnExit>
Working example (if you don't like the button popping underneath the "modal" on fade out, then like the other example, use two sets of state
with onEnter
and onExited
properties) :