Hacker News new | ask | show | jobs
by brimble 1551 days ago
I read it when they first announced it. There was a lot of indirection, which is probably why you had trouble, but in the end, hooks were registered to a list that was associated to your component object (yes, object) in the big, central state machine that is React.

It may have changed since then, but hooks were basically just weird shitty methods & properties with silly non-standard declaration syntax and totally bizarre access/invocation rules, in a language that already had fairly normal objects & methods and all that.

1 comments

Because reusing code in those class based components was never as easy as creating a new hook.