2 ms·
I was just going off my own experience with React through the years. It was very hard to compose behavior with class based components. We had to create higher
by nightski 4y ago
I was just going off my own experience with React through the years. It was very hard to compose behavior with class based components. We had to create higher order components that had functions as children which could pass down data as arguments to the child function. It really made a mess of the component hierarchy. Now you can create reusable custom hooks that can be used from any component.
- skydhash 4y agoI agree with you. It's much better to have useAuth everywhere than having WithAuth capping every class.