4 ms·
I personally love hooks, but I can't agree with the claim that "there is nothing to understand about hooks." For starters, they have to be used in a specific wa
by datagram 6y ago
I personally love hooks, but I can't agree with the claim that "there is nothing to understand about hooks." For starters, they have to be used in a specific way, or else it causes bugs[1]. And there are plenty of other potentially non-obvious things in the (lengthy) FAQ[2]. Once you understand how hooks work they're much easier to work with than class components, but there's definitely a learning curve to using them correctly for anything beyond the simplest use cases.
[1]: https://reactjs.org/docs/hooks-rules.html https://reactjs.org/docs/hooks-rules.html
[2]: https://reactjs.org/docs/hooks-faq.html https://reactjs.org/docs/hooks-faq.html