-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overwriting props will create console warnings #500
Conversation
> Warning: Don't set .props.className of the React component <FlatButton />. Instead, specify the correct value when initially creating the > element. The element was created by LoginDialog. elements should be cloned instead. React.cloneElement was added with React 0.13. http://facebook.github.io/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement Fixed a missing var statement, too.
If we go this route we'll need to update the dep to >=0.13. @mmrtnz There are several similar warnings in the css-in-js branch. I think making the switch to 0.13 and utilizing the cloneElement is a good idea. It also makes the code cleaner. |
You're right, the update would be necessary and generally a good idea, I think. Anyway, there is also |
Some folks have expressed concern over a lack of mixin alternative. It's still supported in v0.13 using React.createClass which facebook has said they do not plan on deprecating until the mixin and property 'problems' have been solved. |
To be honest. I love how react works right now. I don't care for ES6 classes while writing my React components, but I think I'm in the minority with this opinion... |
@grmlin In order to make this change, we'll need to bump the react version dependency in the package.json. I'm not sure if this will created any breaking changes? |
Just bumped react to 0.13.X and rebuilt the docs. Everything appears to be working OK, no errors popping up in the console or broken components. |
overwriting props will create console warnings. Fixes #547
No issues when running on my machine either. Thanks @grmlin! |
Thanks a lot for your work! :) |
elements should be cloned instead. React.cloneElement was added with React 0.13.
http://facebook.github.io/react/blog/2015/03/03/react-v0.13-rc2.html#react.cloneelement
Fixed a missing var statement, too.