首页 > Web开发 > 详细

ReactCSSTransitionGroup

时间:2017-08-24 23:14:16      阅读:240      评论:0      收藏:0      [点我收藏+]

ReactCSSTransitionGroup

  ReactCSSTransitionGroup is a high-level API based on ReactTransitionGroup and is an easy way to perform CSS transitions and animations when a React component enters or leaves the DOM.

import ReactCSSTransitionGroup from ‘react-addons-css-transition-group‘; // ES6
var ReactCSSTransitionGroup = require(‘react-addons-css-transition-group‘); // ES5 with npm
<ReactCSSTransitionGroup
          transitionName="example"
          transitionEnterTimeout={500}
          transitionLeaveTimeout={300}>
          {items}
        </ReactCSSTransitionGroup>

  You must provide the key attribute for all children of ReactCSSTransitionGroup, even when only rendering a single item. This is how React will determine which children have entered, left, or stayed.

  

参考:https://facebook.github.io/react/docs/animation.html#getting-started

ReactCSSTransitionGroup

原文:http://www.cnblogs.com/tekkaman/p/7425694.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!