-
-
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
[Addon: info - v5.x] Story Source breaks if using React.forwardRef #5974
Comments
React.forwardRef
|
@shilman I think this is |
Related: #4961 Looks like this needs to get ported to v5 |
+1 |
Is this also why |
This is being caused by PR #4961 and I'm hoping I have a proposed solution up at the moment. |
@elie222 I'm assuming yes, the original reason I started investigating this was due to inconsistencies between v4 and v5 using styled-components. |
Yippee!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.19 containing PR #6222 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the |
The table component is still not working in my build. "dependencies": { |
@marcel-k Yeah I'm noticing the same thing, except that for mine, there just isn't a Prop Types section at all. Hopefully this can be resolved as well. @Krustal @shilman Edit: I just checked and it was also missing prior to this fix (in version 5.0.x). I was just too distracted by the forwardRef issue to notice. I opened a new issue: |
Whoopee!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.6 containing PR #6222 that references this issue. Upgrade today to try it out! |
Describe the bug
In version 5.0 of the info addon, Story Source is breaking if the component is wrapped in
forwardRef
This additionally breaks the parsing of props in TypeScript (and maybe JavaScript, have not been able to test).
Here are some collapsable sections for the files in question:
Component
Version 4.x Story Source (GOOD)
Version 5.x Story Source (BAD)
To Reproduce
forwardRef
in React.Expected behaviour
Should match up with the result of version
4.x
.System
The text was updated successfully, but these errors were encountered: