-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Throw an error when functions on statics
clash due to duplicate keys
#2036
Conversation
I like this. |
One thing I've noticed: Before this change, if you had a single mixin with its own After this change, the single mixin behavior remains the same. But if you have two mixins with their own |
I know I told you that getDefaultProps in statics should work but now that I'm looking again, I'm not sure if that was actually intended:
|
There's also a note above
Suggests to me that a |
As far as I can tell, (post-change,) putting |
For now, maybe it's best to throw an error if getDefaultProps is in statics. |
(Somewhat relevant: #1601. In this case, we'd want to make sure that the |
Although you'll probably be very confused if you use |
@spicyj Don't all the properties in |
Yes, I'm an idiot. Carry on. |
Throw an error when functions on `statics` clash due to duplicate keys
Fixes #1947.
I agree with @spicyj and find this behavior confusing, so I thought I'd send in a pull request. (This is my first PR for React--did my best to follow the contributing guidelines!)