-
Notifications
You must be signed in to change notification settings - Fork 921
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
got warnings while upgraded to react v15.0 rc #114
Comments
Yes, it would be good idea to change unitless values to 'px' values to avoid errors in future release of React. However, I suggest to use 0.14.8 until RC finalizes. ;) |
React 15 is out now 🎉 |
i currently am in the process of upgrading all dependencies and fixing the issues that got caused in my codebase when updating to 15.0.1, |
Would love your help getting this upgraded @jaeh! |
#132 fixes all errors in my codebase,
is this expected or caused by the positional values erroring? |
@jaeh Is this the error you're seeing?
I've got that test passing by switching to ReactDOM utilities for inspecting the DOM state. Right now that test is digging into private component properties that may not exist anymore in React 15+. const CompactComponent = TestUtils.renderIntoDocument(<Compact {...props} colors={['#fff', '#999', '#222']} />)
let colors = CompactComponent.refs.colors._reactInternalComponent._renderedChildren
let colorCount = 0
for (var color in colors) {
colorCount += 1
}
expect(CompactComponent.props.colors).to.exist
expect(colorCount).to.equal(4) Instead, I've done the following. I'm still getting the numeric string value warnings, but the test is passing. I think it's in keeping with the spirit of the test, without depending on React internals. const CompactComponent = TestUtils.renderIntoDocument(<Compact {...props} colors={['#fff', '#999', '#222']} />)
let colorCount = ReactDOM.findDOMNode(CompactComponent.refs.colors).children.length
expect(CompactComponent.props.colors).to.exist
expect(colorCount).to.equal(4) I've got tests passing and warnings cleared in code-dot-org#1. Not sure if I've missed anything though. |
Sorry all, this has been fixed in |
Thanks! |
I am still seeing this issue. React: v15.0.2 Anyone have any suggestions? |
It sounds like those warnings are a result of This (the numeric string value warning) still repro's for me on a clean clone of I believe I have those warnings fixed on our fork as of code-dot-org#1 and was going to open a pull request as soon as we've seen our application pass its test suite using the change. |
🙌 |
Timing update: Code.org is likely to ship with our React 15 changes today. I'll open the PR with our changes this evening. |
Absolutely useless warning. It doesn't show the source of the issue. |
Issue resolved. Thanks guys! |
react added a helpful warning in v15.0 rc-1:
warnings like these:
Warning: a
divtag (owner:
Saturation) was passed a numeric string value for CSS property
bottom(value:
0) which will be treated as a unitless number in a future version of React.
Warning: a
divtag (owner:
Alpha) was passed a numeric string value for CSS property
right(value:
0) which will be treated as a unitless number in a future version of React.
The text was updated successfully, but these errors were encountered: