-
-
Notifications
You must be signed in to change notification settings - Fork 312
Feature/dependencies #93
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
Conversation
|
So, what would be the difference between Do you think this handler needs to be part of react-docgen core? I'm hesitant to include any more handlers. I think this could every well be a plugin that people can use if they want to. I think we'd only need to make it easier to include handlers via the command line. What do you think? |
|
I feel that composes feels like it is targeted for the case: Whereas dependencies does not really imply any propTypes and focus on the components that are referenced in the render method. I felt that it is unnecessary to enforce that composition is done via propTypes with the spread operator. In some cases, there is no need to declare the propTypes as well such as: Also, the proposed method also includes native tags that can be useful as well. I thought that the composition is one of the fundamental strengths of React and documenting component dependencies is an obvious benefit to be included by default. I would think that dependencies might be more useful than composes for beginners. Is there a list of plugins that are build on top of react-docgen? Personally, I would like having the handler here with all the build and test processes already well crafted and we have more radar on future regressions. Another consideration is to combine composes and dependencies but it might dilute the meaning of composes for devs that are already using it. Cheers :) |
|
Hey, wondered if the PR could be reconsidered. Otherwise, would it be possible to cherry pick just the changes on this file: https://github.com/khankuan/react-docgen/blob/4dfb0fbc5d9ff43df9fdc5f1dfd9f6797f129728/src/utils/resolveToModule.js |
|
You probably don't need this anymore but I update |
Initial implementation for #82. Open to any feedbacks to get the feature available as soon as possible :)