-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add support for higher order components with any arbitrary depth. #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR, if we can get these two very minor issues taken care of, I'll get this merged in and published for you.
test/fixtures/hoc/actual.js
Outdated
} | ||
|
||
Component.propTypes = { | ||
children: React.PropTypes.string.isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some comments in here like /* comment */
like the other files so we can make sure those are extracted properly?
test/fixtures/hoc/actual.js
Outdated
style: React.PropTypes.object, | ||
} | ||
|
||
export default withHoc()(deeperHoc(Component)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you mind adding another test with just 1 hoc? it's a slightly different test case and I don't want this to regress in case someone refactors this.
Thanks for your quick response! |
Thanks! |
We have the need to support higher-order-components in our docs.
So I added the possibility for the plugin to also provide information about these.
For example this needs to be supported:
export default connect()(withRouter(MyComponent))
It's supported by
react-docgen
but not by this plugin. With this PR it should also work here :)