[addon-docs] prop descriptions not extracted for default exports
See original GitHub issueI noticed that docgen is not able to extract any prop descriptions for default exports, why is that? Where this limitation comes from? It is a huge shortcoming for any containers (which I think constitute majority of components in any react app), since they are usually exported as defaults.
Should we export them separately from the module, or what’s the recommended approach to deal with that?
Environment Info:
System:
OS: macOS 10.15.5
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 10.20.1 - ~/.nvm/versions/node/v10.20.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v10.20.1/bin/npm
Browsers:
Chrome: 83.0.4103.116
Safari: 13.1.1
npmPackages:
@storybook/addon-actions: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/addon-controls: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/addon-docs: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/addon-knobs: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/addon-links: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/addons: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/preset-create-react-app: ^2.1.2 => 2.1.2
@storybook/react: ^6.0.0-beta.37 => 6.0.0-beta.37
@storybook/theming: ^6.0.0-beta.37 => 6.0.0-beta.37
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
@storybook/addon-docs - npm
Start using @storybook/addon-docs in your project by running `npm i ... text descriptions, docgen comments, props tables, and code examples ...
Read more >Storybook Docs with mdx support and addon knobs - Medium
The “Default” in export const Default is what you have your component titled as in the side nav. You can have multiple versions...
Read more >How do I render an MD file for a custom Storybook addon?
... that if I pulled import { Description } from "@storybook/components"; instead of @storybook/addon-docs , everything worked as expected.
Read more >export - JavaScript - MDN Web Docs
Description. Every module can have two different types of export, named export and default export. You can have multiple named exports per ...
Read more >@storybook/addon-docs | Yarn - Package Manager
@storybook/addon-docs ... Document component usage and properties in Markdown ... Merge all PRs into next , which is the default branch.
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 FreeTop 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
Top GitHub Comments
We are using typescript types and they aren’t picked up from default exports.
Please upgrade preset-create-react-app to the latest:
npx sb@next upgrade --prerelease