Display components wrapped in Higher-Order components
See original GitHub issueHey,
I applied the Higher-Order Component (HOC) design-pattern (concept for react explained here) like this: https://github.com/vuejs/vue/issues/6201#issuecomment-318009211
A component that makes use of such a HOC is no longer displayed by vue-styleguidist.
I suppose that vue-styleguidist needs a component to return an Object of the structure seen in the screenshot. A HOC of course returns a function instead, as seen in that screenshot as well.
Is it possible to implement that feature? Thanks
Also, if possible, respect /** */ inline documentations defined in HOC’s.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Higher-Order Components - React
A higher-order component (HOC) is an advanced technique in React for ... The most common technique is to wrap the display name of...
Read more >Higher-Order Components In React - Smashing Magazine
A higher-order component (HOC) is an advanced element for reusing logic in React components. Components take one or more components as arguments ...
Read more >Introduction to Higher-Order Components in React by example
React's Higher Order Component is a pattern that stems from React's nature that privileges composition over inheritance. Consider this example –
Read more >Understanding React higher-order components
A higher-order component is a function that takes in a component and returns a new component. Using code, we can rewrite the above...
Read more >React Higher-Order Components (HOCs) - Robin Wieruch
Higher -Order Components in React, also known as HOCs, are an advanced component pattern in React (next to Render Props Components).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey @hollandThomas I will close this issue for now as I feel like Vue 3 is going to make it completely obsolete. Fell free to re-open it if you make a use case.
Hey @hollandThomas , great suggestion.
For now most of what
vue-styleguidistis doing is displaying whatever vue-docgen-api returns. This module only parses components. We could create a plugin for this api for it to parse the HOC pattern.If you can cook up a little test to showcase the pattern then we would add it as a test/example to the main repo and could start working on a solution to make it work. I am not familiar with the issue it solves.
Thank you in advance