Using ReactCSSTransitionGroup with styled-component
I didn’t want to use injectGlobal as suggested in another answer because I needed to make the transitions different per component. It turns out to be pretty easy – just nest the transition classes in the styling for the component: import React from “react”; import CSSTransitionGroup from ‘react-transition-group/CSSTransitionGroup’; import styled from ‘styled-components’; const appearDuration = … Read more