当我使用React Shuffle组件
时,我收到此警告 bundle.js:8335警告:标记上有未知道具duration
,fade
,initial
。从元素中删除这些道具。
shuffle的渲染方法如下:
render() {
let { initial, fade, duration, ...props } = this.props;
var showContainer = initial ? 0 : 1;
if (this.state.ready) {
showContainer = 0;
}
return (
<div ref="container" style={{position: 'relative'}} {...props}>
<div style={{opacity: showContainer}}>
{this._childrenWithRefs()}
</div>
</div>
);
}
我的package.json文件如下:
{
"name": "App",
"version": "0.1.0",
"private": false,
"devDependencies": {
"react-scripts": "0.4.1",
"react-slick": "^0.14.3"
},
"dependencies": {
"crypto-js": "^3.1.6",
"react": "^15.3.1",
"react-addons-css-transition-group": "^15.3.1",
"react-dom": "^15.3.1",
"react-fontawesome": "^1.2.0",
"react-redux": "^4.4.5",
"react-router": "^2.8.1",
"react-shuffle": "^2.0.0",
"react-telephone-input": "^3.5.0",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "./node_modules/react-scripts/config/eslint.js"
}
}
在网站here上,他们说问题已解决。但我有相同的配置,我做了这些更改,但问题仍然存在..
有什么建议吗?