-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
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
Using React.memo causes issues with Storybook Info Addon #6298
Comments
Ermahgerd!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.25 containing PR #6347 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
@shilman Hi, thx for the updates. In @next version (5.1.0-rc.3) using react memo, have same story with memo components (in JSX tab). |
@ConstRep Can you file an issue on |
in ^5.1.1 have
|
FYI this should be fixed in SB docs, which displays the actual source code. See the 5.1 release post for more info on how to kick the tires: https://medium.com/storybookjs/storybook-5-1-50afd02b5bbb |
i have checked in 5.2.0-beta.38 still have issue
|
DocsPage is replacing addon-info. Announcement here: https://medium.com/storybookjs/storybook-docspage-e185bc3622bf |
Still an issue in
As soon as I wrap my component in |
Will fix: #8361 |
Yup still happening in the last version 6.3.6 My solution is to export a version of the component without the memo and one with the memo and use the one without in storybook
In the story
|
Describe the bug
Wrapping a functional component with
React.memo
causes the Info Addon to display the Story Source as<Unknown />
and causes all the Prop Types to disappearTo Reproduce
Steps to reproduce the behavior:
React.memo
Screenshots
React.memo
React.memo
Code snippets
webpack.config.js
story
System:
The text was updated successfully, but these errors were encountered: