I assume you are using higher order components, then you can compose multiple higher order components into one component. There are several ready made utility functions for this. For example in lodash (flowRight) and compose if you are using redux.
You can check out this example I made using lodash flowRight and made two hooks available as HOC using my code example. codesandbox.io/s/compose-higher-or...
Or you can wrap several higher order componens in each other, like this
withTodos(withUsers(App))
But I like the composing approach in the example for readability.
Hope it helps :-)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How do you inject more hooks into the class component?
I assume you are using higher order components, then you can compose multiple higher order components into one component. There are several ready made utility functions for this. For example in lodash (flowRight) and compose if you are using redux.
You can check out this example I made using lodash flowRight and made two hooks available as HOC using my code example.
codesandbox.io/s/compose-higher-or...
Or you can wrap several higher order componens in each other, like this
withTodos(withUsers(App))
But I like the composing approach in the example for readability.
Hope it helps :-)