Hacker News new | ask | show | jobs
by SkyPuncher 1315 days ago
Everything in hooks is explicit. Which is a blessing and a curse.

Classes were really easy to compose and automatically easily bring everything you needed into the class. This did lead to some situations where you could over-engineer and get yourself into a bind. You can technically do the same/similar thing with hooks, it just requires a bit more code. Lack of setup/tear down with hooks also means you need to rely on nonces more often.

In general, hooks have a bunch of small, reactive-programming tricks that you learn with experience.