by jefb · 4y ago · 0 comments
A stateless programming model in a domain where state is so fiercely coupled to program utility is inevitably going to spawn this garbage.
Class based components with MobX managing state was, and still is, a dream to write __and__ read.
Literally, calling ‘useMemo’ twice returns two different objects, because the function keeps track in internal state of how many times it has been called.
Hooks are very deeply imperative.
They are a way of obtaining some benefits that are easily obtained in functional programming via higher-order functions, but expressed in a way that makes them easily consumed in an imperative code body.
React has always been an exercise in smoke and mirrors.