News for hackers. Stuff that matters.
Re:Hooks are the best thing to happen to React by imbnwa on Saturday October 23, 2021 @11:47AM (#28969567)
> But it actually more closely matches what’s really going on, so it’s more straightforward to someone familiar with how React works. The class-based API did not closely match how React actually works and so led to various common bugs which don’t occur anymore with the hooks API.

I see this said a lot, so what's really going on that the class API obfuscates?

Re:Hooks are the best thing to happen to React by portlander52232 on Saturday October 23, 2021 @08:39PM (#28973796)
It isn’t perfect but this is probably the best explanation that I know of https://overreacted.io/a-complete-guide-to-useeffect/