News for hackers. Stuff that matters.
Re:The Plan for React 18 by davnicwil on Tuesday June 08, 2021 @04:32PM (#27440384)
I think your first point gets to a tradeoff that isn't much discussed about hooks- they can be elegant and simple, but only assuming quite a bit of upfront knowledge about how they work.

It's almost like taking the verbosity of class lifecycle methods, and 'pre compiling' it into a form which is terser, yes, but that now only a sufficiently informed reader can grok - the lifecycle is still there, it just has to be modelled by the reader instead of by the code.

Sometimes this is a good tradeoff, but not always.

There are no comments on this comment yet.