Skip to content
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

PropTypes displaying as [Object object] #143

Closed
fauxparse opened this issue Mar 25, 2019 · 3 comments
Closed

PropTypes displaying as [Object object] #143

fauxparse opened this issue Mar 25, 2019 · 3 comments

Comments

@fauxparse
Copy link

The type column of my PropTypes table (for a React component) is displaying all types as [Object object]. Perhaps something has changed or is not set up correctly, because

To fix this, I had to hack the propsFromDocgen function as follows:

propType: propType.name || propType,

Doing a bit of digging, I found that in my particular case, propTypes is ending up with an object rather than a plain string.

Am I doing something wrong?

@tuchk4
Copy link
Owner

tuchk4 commented Mar 28, 2019

Thanks for reporting.
I would like to link this issue with #137

Going to fix both as soon as possible

@Zyzle
Copy link

Zyzle commented Apr 4, 2019

@tuchk4 is there any chance you could add the above from @fauxparse as a fix for this? It seems proptypes are now always returned as objects from babel-plugin-react-docgen in the most recent versions

@tuchk4
Copy link
Owner

tuchk4 commented Apr 4, 2019

@Zyzle I am going to release new version with this fix at the end of this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants