Reactjs 不设置React组件的.props.className?

Reactjs 不设置React组件的.props.className?,reactjs,Reactjs,我刚刚更新为React 0.13.1,收到以下警告: Warning: Don't set .props.className of the React component. Instead, specify the correct value when initially creating the element. The element was created by ... 我做错了什么 您正在尝试在组件中修改this.props.className吗?组件不应该修改它自己的道具,它们应该由

我刚刚更新为React 0.13.1,收到以下警告:

Warning: Don't set .props.className of the React component. Instead, specify the correct value when initially creating the element. The element was created by ...

我做错了什么

您正在尝试在组件中修改this.props.className吗?组件不应该修改它自己的道具,它们应该由父级传入。看看你的第三方模块,它可能正在做一些奇怪的事情,或者你几个月前编写的代码,等等。如果没有导致问题的特定代码,我们无法向错误添加太多内容。最后,你得到的元素是由。。。这告诉你应该去哪里看。听起来是这样的,但是我检查了组件,有很多组件抛出了这个警告,没有发现任何立即出错的地方。我会继续玩它,如果我弄明白了,就贴在这里。谢谢