Remove getDefaultProps from plain Javascript class#9241
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
The only issue was the syntax, can you add back the default props? class X {
static defaultProps = {
stuff
};
} |
|
@romidane updated the pull request. |
|
@ide : Sure thing I've added back the default props. |
|
@romidane updated the pull request. |
|
@ide : I made the change. Had to double just with the style guide :) |
|
I noticed this PR is to the 0.31-stable branch. Can you please resubmit a PR to master? |
and add PropType validation * getDefaultProps is not available in ES6 class style declaration
|
@romidane updated the pull request. |
|
@ide: Seems like the syntax problem has been resolved on master already. I think this PR would only be benficial as a patch to this tag? |
|
Ah ok, will merge in that case. |
motivation
getDefaultPropsis not available in ES6 class declaration for components. Adding it here may cause confusion to new comers.