-
Notifications
You must be signed in to change notification settings - Fork 254
No props data outputted for components typed with React.FC<> #393
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
Comments
I have the same problem, whether we can support this way |
I've run into the same problem in storybook attempting to create a guide for our customized react-bootstrap components. I've yet to discover a workaround. Potentially related issues I found when trying to resolve this problem: This is outside my domain of expertise but if a steward of this repo could point me to a good starting place I could make an attempt at a PR. |
After poking around the repo a bit I've discovered several tests actually do use |
Yes. I can confirm this. I had the same issue and using this |
Can confirm the solution @upalatucci provided worked for me. Thank you so much for finding that! |
There was no activity for a long time. The issue will be closed soon. |
Closing this issue as obsolete. |
Hi, I have a component that looks like this
When parsing props for this component I get no props output =>
require('react-docgen-typescript').parse(...)
returns an empty array.Changing to the following returns props as expected:
Would it be possible to support the React.FC type assignment as well? That is my preferred way to type my functional components since it takes care of typing things like
props.children
correctly without an explicit field in the interface.The text was updated successfully, but these errors were encountered: