4 ms·
Another +1 for Hooks. I was really against it at first, but now I'll never go back. React components should really be nothing more than a view layer and Hooks f
by aphextron 7y ago
Another +1 for Hooks. I was really against it at first, but now I'll never go back. React components should really be nothing more than a view layer and Hooks forces you to stop thinking in the component/class paradigm, which generally makes things a lot more modular and reusable. I've been using XState to handle business logic and MobX as a data store, leaving React to simply render the data. No more huge class files and complicated life-cycle methods.