Closed
Description
What problem does this feature solve?
Currently I can't find anything official Vue document to create HOC. The closest thing I can find on the web is this post https://medium.com/tldr-tech/higher-order-components-in-vue-js-38b500c6d49f and spreading all the properties seem verbose.
I think the popular way to achieve composition in Vue component is to use mixins, and there are some common problems for minxins:
- Mixins introduce implicit dependencies
- Mixins cause name clashes
- Mixins cause snowballing complexity
I know for 2 Vue handles conflicting pretty well and for 3, I personally think it would be developer's own fault to using an "escape hatch" to finish complex composition. but still 1 could be a problem. So my next question is, does Vue promotes the use of mixin?
What does the proposed API look like?
Maybe something like Vue.composite(wrappedComponents, addedProperties)
Metadata
Metadata
Assignees
Labels
No labels