import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
const Cart = (props) => {
...
return (
<section className="cart">
{items.map(item =>
<ReactCSSTransitionGroup
transitionName="example"
transitionEnterTimeout={5000}
transitionLeaveTimeout={3000}>
<CartItem key={item.id} item={item} />
</ReactCSSTransitionGroup>
)}
</section>
);
};
return (
<ReactCSSTransitionGroup
component="section"
className="cart"
transitionName="example"
transitionEnterTimeout={5000}
transitionLeaveTimeout={3000}
>
{items.map(item => <CartItem key={item.id} item={item} />)}
</ReactCSSTransitionGroup>
);