News for hackers. Stuff that matters.
Re:Is React impacted by Meta layoff? by SkyPuncher on Wednesday November 09, 2022 @07:37PM (#33540502)
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.

There are no comments on this comment yet.