> You lose so much with [higher order components], especially with es6:
> You lose the (original) class, and with it, the ability to compose it, to extend it and …. reflection. All your components are [the higher order component]. For example, you cannot rely on the Class.name in es6.
> You lose the ability to extend the component and expose extra members. Your higher order component will not ‘pass’ that through.
> The above two basically renders the ability to compose several decoupled and agnostic one to the other “higher level components” impossible.
> It is verbose and non-declarative , and basically much less readable and maintainable.
If there's a better pattern than mixins, I would say its traits[1]. For some reason, I don't find it used much often in the wild. I'm not sure it would be practically applied to React anyway without ending up with mixins again, but at least the concept would be clearer: there should be no shared state and dependencies are explicit.
0. https://medium.com/@danikenan/you-lose-so-much-with-your-sol...
1. https://en.wikipedia.org/wiki/Trait_%28computer_programming%...