4 ms·
hooks were created to replace the functionality of mixins, not necessarily to replace lifecycles The react team could have easily added a useDidUpdate() and use
by DanielHB 4y ago
hooks were created to replace the functionality of mixins, not necessarily to replace lifecycles
The react team could have easily added a useDidUpdate() and useWillMount(), but they didn't because the new abstractions cover the mixins use-cases also work better than lifecycles as well (but somewhat less intuitive at first glance)