We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current behavior
Version: ^11.0.8 Report warning when document has a public method in class
Warning: Failed prop type: The prop `name` is marked as required in `ArgumentRenderer`, but its value is `undefined`.
Since v10.3.0, it started to use tsx, and name props in ArgumentRenderer became a required prop: https://github.com/styleguidist/react-styleguidist/blob/master/src/client/rsg-components/Argument/ArgumentRenderer.tsx#L18 However, the @returns param don't have a name props
@returns
name
To reproduce
import React from 'react'; import PropTypes from 'prop-types'; export default class Issue extends React.Component { static propTypes = { myProps: PropTypes.bool, }; /** * Public Method * * @public * * @returns {Boolean} return a Boolean Value */ somePublicMethod = () => { // doSomething return this.props.myProps; } render() { return 'Open console, see warnings'; } }
https://github.com/lyz810/styleguidist-example/blob/master/src/components/Issue.js please open console, and check the warning printed. Expected behavior
Don't show warning when using @returns param, or don't consider name props of ArgumentRenderer as required props.
The text was updated successfully, but these errors were encountered:
Feel free to send a pull request with a fix! 👾
Sorry, something went wrong.
fc29f90
🎉 This issue has been resolved in version 11.0.11 🎉
The release is available on:
Your semantic-release bot 📦🚀
No branches or pull requests
Current behavior
Version: ^11.0.8
Report warning when document has a public method in class
Since v10.3.0, it started to use tsx, and name props in ArgumentRenderer became a required prop:
https://github.com/styleguidist/react-styleguidist/blob/master/src/client/rsg-components/Argument/ArgumentRenderer.tsx#L18
However, the
@returns
param don't have aname
propsTo reproduce
https://github.com/lyz810/styleguidist-example/blob/master/src/components/Issue.js
please open console, and check the warning printed.
Expected behavior
Don't show warning when using
@returns
param, or don't considername
props of ArgumentRenderer as required props.The text was updated successfully, but these errors were encountered: