Replies: 1 comment
-
See vuejs/rfcs#477. Discussion is welcome. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When building libraries, it is often necessary to implement some form of HOC to simplify/reduce duplicated code. For example,
const Header = withProvider(BaseHeader)
const HeaderButton = withContext(BaseHeaderButton)
In TypeScript, implementing this is more complex (compared to React or JS), due to the proper type forwarding (for props, events, etc) so that the HOC exposes the same interface as the base component.
Although, there are many variations in community maintained libraries on how to build this, some are tightly coupled to the library internals, and there is no official recommended way on how to implement this behavior.
I believe it would be beneficial to include a guide in the docs on building this, and would like to gather opinions from the community on whether this is needed.
Beta Was this translation helpful? Give feedback.
All reactions