News for hackers. Stuff that matters.
Re:Ask HN: What Lived Up to the Hype? by cercatrova on Thursday December 24, 2020 @05:20PM (#25532014)
It seems you are. I'd encourage you to read briefly through [1] that I linked above, it shows why hooks are needed rather than just functions. Basically you're passing state around in a Closure such that you can hook into life cycles from any part of the app. This means that I can create a self contained hook for something like making an animation for a component and making it usable for any component I want, rather than wrapping everything into an AnimationComponent just to get the lifecycle state. I can reuse this behavior anywhere else in the app.

There are no comments on this comment yet.