警告:propType 失败:transitionAppearTimeout 未提供给 ReactCSSTransitionGroup (React.js)

Warning: Failed propType: transitionAppearTimeout wasn't supplied to ReactCSSTransitionGroup (React.js)

我的代码工作正常,但我遇到了这个恼人的错误。有什么问题?

Warning: Failed propType: transitionAppearTimeout wasn't supplied to ReactCSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See fb.me/react-animation-transition-group-timeout for more information. Check the render method of SocialIcons.

render: function() {

        return (

        <ReactCSSTransitionGroup transitionName="example" transitionAppear={true}>
                <div className="small_caps" key="small_caps">
                    <a href="mailto:******" key="email" id="email" target="_blank"><i className="fa fa-envelope fa-lg"></i></a>

                </div>
        </ReactCSSTransitionGroup>

        );

var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;

该错误表明,由于您使用

启用了在初始挂载时出现的转换

transitionAppear={true}

您需要为超时 transitionAppearTimeout 提供一个值。这是通过组件规范强制执行的。

尝试使用此 属性 明确地为动画提供超时值,如 fb 文档中所述。

<ReactCSSTransitionGroup transitionName="example" transitionAppear={true} transitionAppearTimeout={500}>