Upgrade to the latest react-docgen
See original GitHub issueThe latest version of react-docgen includes fixes for support of union types in JSDoc, which would be really great to have supported in react-styleguidist as well.
https://github.com/reactjs/react-docgen/commits/v2.10.0
I discovered this by tracking down the following console error (styleguidist server console - not JavaScript console).
Error when parsing src/components/select/Select.js
TypeError: Cannot read property 'name' of undefined
Here is an example of the offending JSDoc comment: Note the union type of {(string|number)}.
/**
* Retrieve a value from the given options and valueKey
* @param {(string|number)} value - the selected value(s)
* @param {Object} props - the Select component's props (or nextProps)
*/
expandValue(value, props) {
...
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
react-docgen - npm
A CLI and toolkit to extract information from React components for documentation generation.. Latest version: 5.4.3, last published: 6 ...
Read more >reactjs/react-docgen: A CLI and toolbox to extract ... - GitHub
A CLI and toolbox to extract information from React component files for documentation generation purposes. - GitHub - reactjs/react-docgen: A CLI and ...
Read more >react-docgen-typescript | Yarn - Package Manager
A simple parser for React properties defined in TypeScript instead of propTypes. It can be used with React Styleguidist. Installation.
Read more >storybook-addon-react-docgen
A storybook addon to display react docgen info. This addon is a drop in replacement for the "info" addon's prop table functionality. Rather...
Read more >react-docgen Playground
A CLI and toolbox to extract information from React component files for documentation generation purposes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@nhavar Yep, we’ll see very son.
Fixed in #189.