-
Notifications
You must be signed in to change notification settings - Fork 255
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
Props not detected unless "import * as React from 'react'" #323
Comments
Did anyone manage to resolve this issue yet? |
In my case changing the export type of the components from default export to named export fixed it. |
Well that's not what I call a solution but a workaround 😅 |
When React is imported via This lack of a symbol causes getComponentInfo to return an empty object for props because both I've never delved into this part of JS/TS so my lack of knowledge is hampering my progress. I would appreciate it if someone could take this info and either run with it or provide me with a poke in the right direction. @hipstersmoothie and @pvasek have touched this area most recently (though it has been a while). Could either of you help me out? |
I'm looking forward to this issue too, I just recently introduce storybook in our project and I don't get the docgen working |
There was no activity for a long time. The issue will be closed soon. |
Closing this issue as obsolete. |
The TS interface/type used for a component's props are not picked up unless in the same file all of React is imported via:
import * as React from 'react'
.This is a bug that needs addressing - happy to help, point me in the direction.
I stumbled across this here also:
strothj/react-docgen-typescript-loader#10 (comment)
The text was updated successfully, but these errors were encountered: