Created
June 15, 2023 20:38
-
-
Save KrisKnez/af2233d1d6064ff07ab698a969fd9195 to your computer and use it in GitHub Desktop.
React Typescript Hight Order Component (HOC) inherit Compound Components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have a React component with compount components e.g. List, List.Item using HOC will remove compound components. | |
For the HOC to inherit compound components you need to do it manually. | |
Use a library like: https://www.npmjs.com/package/hoist-non-react-statics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment