Ad

React Transition Fade Between New And Old Children Elements

- 1 answer

I have a React component rendering a child element via props.children. The content of this child element is dynamic. What is the best way to transition (fade out old, fade in new) between these elements?

Ad

Answer

Check out the React docs for some info on the ReactTransitionGroup add-on component. This should be able to do what you need.

Ad
source: stackoverflow.com
Ad