News for hackers. Stuff that matters.
Re:Write Libraries, Not Frameworks by sfvisser on Saturday May 09, 2020 @06:51AM (#23123661)
> The main thing being the meaning of having dependencies for useEffect and other hooks.

This is 100% a result of how react (ab)uses the host language semantics to implement their DSL to describe components and has nothing to do with the conceptual nature of functional components themselves.

It relatively easy to imagine a design that doesn’t require the dependency lists when capturing a callback closing over props or state.

Not saying that design would be better or worse, just that it could exist and still leverage concepts like FCs, hooks, effects etc.

There are no comments on this comment yet.