We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Hi,
I am trying to understand why the following doesn't work. The defaultValue for hey and oh is undefined.
hey
oh
const TO_SPREAD = { hey: "ho!" } export const MyComponent = ({ text }) => { return <div>{text}</div> }; MyComponent.propTypes = { text: PropTypes.string, hey: PropTypes.string, oh: PropTypes.string, }; MyComponent.defaultProps = { text: "Hey!", ...TO_SPREAD }; MyComponent.defaultProps.oh = "foo!";
I get the following result:
{ "description": "", "displayName": "MyComponent", "methods": [], "props": { "text": { "type": { "name": "string" }, "required": false, "description": "", "defaultValue": { "value": "\"Hey!\"", "computed": false } }, "hey": { "type": { "name": "string" }, "required": false, "description": "" }, "oh": { "type": { "name": "string" }, "required": false, "description": "" } } }
Thank you,
Patrick
The text was updated successfully, but these errors were encountered:
This will be fixed in the next version. Thanks for reporting.
Sorry, something went wrong.
@shilman 🥳🥳
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am trying to understand why the following doesn't work. The defaultValue for
hey
andoh
is undefined.I get the following result:
Thank you,
Patrick
The text was updated successfully, but these errors were encountered: