2 ms·
But a lot of the issue with HOCs was that they were so dynamic and difficult to properly type - simple cases would work but be very complex, and complex cases w
by MrJohz 4y ago
But a lot of the issue with HOCs was that they were so dynamic and difficult to properly type - simple cases would work but be very complex, and complex cases were almost impossible without dropping down into `any` types or type assertions somewhere along the way.
In contrast, hooks work much better from a typed perspective, but also from the perspective of providing composition over inheritance - it's much easier to compose multiple hooks to create new functionality than it was to compose multiple HOCs.