React animate transition between components
问题 I'd like to animate between two components where the first component fades out and is removed from the DOM before the next component is added to the DOM and fades in. Otherwise, the new component is added to the DOM and takes up space before the old component is removed. You can see the problem in this fiddle: http://jsfiddle.net/phepyezx/4 // css snippet .switch-enter { opacity: 0.01; } .switch-enter.switch-enter-active { opacity: 1.0; } .switch-leave { opacity: 1.0; } .switch-leave.switch