码迷,mamicode.com
首页 > Web开发 > 详细

ReactCSSTransitionGroup

时间:2017-08-25 00:00:43      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:leaves   span   tps   npm   ctc   react   htm   es6   and   

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

标签:leaves   span   tps   npm   ctc   react   htm   es6   and   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!