-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
Consider using .valueOf()
before providing fragment warning.
#4769
Comments
Why are you using Number objects instead of numbers? |
Fair question. In this case I'm moving Backbone code to React. I use a function to convert incoming JSON into an Immutable.js Map, which maps fields to types like so: types: {
price: Money,
unbilled_fixed_value: Money,
unbilled_hourly_value: Money,
unbilled_value: Money,
assigned_user_ids: Immutable.Set,
price_type: PriceType
} Here So, in my For what it's worth, I probably wouldn't have chosen to subclass |
I don't think we're going to support this, sorry. You can use
We usually warn for things that will break in future versions. This particular pattern will break hard in 0.14. |
Fair enough, thanks for the explanation. |
We updated and started getting this warning everywhere:
Took me a while to realize that it was because we were using
Number
instances in our jsx.I wonder if it would be acceptable to apply
.valueOf()
first (if present) to legalize this situation?The text was updated successfully, but these errors were encountered: