Skip to content

React: Fix default export docgen for React.FC and forwardRef#22024

Merged
shilman merged 1 commit into
nextfrom
kasper/react-docgen-fix
Apr 11, 2023
Merged

React: Fix default export docgen for React.FC and forwardRef#22024
shilman merged 1 commit into
nextfrom
kasper/react-docgen-fix

Conversation

@kasperpeulen
Copy link
Copy Markdown
Member

Closes #21898, closes #21801

What I did

Bumped the version, so we get the fixes from this PR:
storybookjs/react-docgen-typescript-plugin#10

How to test

See this repo:
https://github.com/kyletsang/storybook-ts-docs-repro

Copy the non working example to a webpack react repo, and see that it works now!

-->

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • [] Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@kasperpeulen kasperpeulen requested a review from shilman April 11, 2023 13:00
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Apr 11, 2023
Copy link
Copy Markdown
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @kasperpeulen

@shilman shilman added the react label Apr 11, 2023
@shilman shilman changed the title Fix default export react docgen when typed with React.FC or using forwardRef React: Fix default export docgen for React.FC and forwardRef Apr 11, 2023
@shilman shilman merged commit dbdb725 into next Apr 11, 2023
@shilman shilman deleted the kasper/react-docgen-fix branch April 11, 2023 13:45
shilman added a commit that referenced this pull request Apr 11, 2023
React: Fix default export docgen for React.FC and forwardRef
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Apr 11, 2023
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addon: controls addon: docs argtypes bug patch:done Patch/release PRs already cherry-picked to main/release branch react typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Documentation is not generated when using React.FC in TypeScript [Bug]: Typescript argType inference is not working

3 participants