-
-
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
[Core] Update to React v15 #3941
Conversation
Also... can someone test if this works with React 14? I left it as an option in peer dependencies... |
Do these have
Edit: Nvm, I guess it doesn't matter since they are dependencies instead of peerDependencies. What do you think? |
Do we need to upgrade recompose to |
@newoga yep I should update these:
|
I removed the peer dependencies for the older react version as we depend on react addons that we have upgraded to the v15 versions. In their I spoke to @newoga and we're not sure what the best/most compatible setup is here that we can go with. We were hoping you might know some more about this 😄 IMO, we should avoid breaking |
@nathanmarks I think @oliviertassinari has a new version of |
Looks good to me 👍 |
I have noticed that the |
@antoinerousseau yep |
@oliviertassinari thanks, completely forgot to cover that section. shit like this: lol |
@oliviertassinari fixed the silly docs errors 😄 👍 |
@nathanmarks Nice work 👍. |
@@ -204,7 +209,7 @@ class Toggle extends React.Component { | |||
); | |||
|
|||
if (this.state.switched) { | |||
thumbStyles.marginLeft = `-${thumbStyles.width}`; | |||
thumbStyles.marginLeft = 0 - thumbStyles.width; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is resulting to NaN when thumbStyles width is set to something like '10px'!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a fair point. Do you want to submit a PR to fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, my suggestion won't work. It's raising a warning:
Warning: a
div
tag (owner:Paper
) was passed a numeric string value for CSS propertymarginLeft
(value:-20
) which will be treated as a unitless number in a future version of React.
You gonna have to use 10
instead of 10px
until we change the styling approach with the next
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply. But things will break right because of this inconsistency.
Hope this will help
0 - parseInt(`${thumbStyles.width}`.replace('px', ''), 10)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviertassinari Raised a PR - #5116
Worked my way through the docs to fix React v15 compatibility. Updated dependencies.
Anyone want to update the examples? 😄
some relevant issues I made while doing this:
Fixes #3940
Fixes #3942
Fixes #3943
Fixes #3945
@callemall/material-ui holler