Not working with `forwardRef` wrapped components
See original GitHub issueThis seems to exit early when a component is generated in a forwardRef
call:
const Component = React.forwardRef(() => {
return <div>Hello</div>
});
And as such does not attach any docgen data. This seems to stem from actualNameHandler
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Bug: React.forwardRef() wrapped component does not have ...
Automatically generating the name is not something React can really do, since (in many cases) showing "forwardRef" would be confusing.
Read more >How do you wrap a forwardRef component with a HOC?
If you're returning a wrapped component, then you have to also forward its reference by using forwardRef() and setting the ref prop.
Read more >Forwarding Refs - React
Ref forwarding is a technique for automatically passing a ref through a component to one of its children. This is typically not necessary...
Read more >How to use React's forwardRef function - Felix Gerschau
Our task is to forward the ref that the Input component receives to the HTML input element. We do that by wrapping the...
Read more >Connect | React Redux
If {forwardRef : true} has been passed to connect , adding a ref to the connected wrapper component will actually return the instance...
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
fixed in
v3.0.0
, will integrate into storybook.any chance you can issue a PR for this? If so I can test and release an upgrade