... hooks were a revelation. They really did make it easy to encapsulate behavior and reuse stateful logic.
but
... anything that checks referential equality before running side effects — useEffect and its siblings — will get triggered too often.
and
... callbacks that persist between renders — because of useCallback, asynchronous operations, timeouts, etc — will access stale data.
and the answer is
... pretty kludgy! We’re now tracking the count in two different places, and our increment function has to update them both
so
... Hooks gave us a much better primitive for composing stateful logic, but it came at a cost.
The cost of your application being correct. It's fine if you're writing the kind of apps that you don't need React for (99% of them) but if you're working on apps that really need React it's awful.
On paper immutability is a good idea but it means you have different versions of the component being managed by the React, so now your app is like this guy
(At least if you use redux you can put all the insanity in one place and time travel over it)
What they call "signals" are a real improvement except somehow nobody told people that the word "signal" is used for one of the great mistakes of POSIX
(see the part about "Risks" to see why they were a mistake). Use a word for an edge-triggered mechanism to describe a level-triggered mechanism is frighteningly like the kind of thinking that led to (i) react hooks and (ii) people thinking react hooks are acceptable so I am still a little terrified... But hey, I wrote a very complex knowledge graph editor in GWT (same async communication as Javascript) before many of you were in elementary school.
On paper immutability is a good idea but it means you have different versions of the component being managed by the React, so now your app is like this guy
https://en.wikipedia.org/wiki/The_Minds_of_Billy_Milligan
(At least if you use redux you can put all the insanity in one place and time travel over it)
What they call "signals" are a real improvement except somehow nobody told people that the word "signal" is used for one of the great mistakes of POSIX
https://en.wikipedia.org/wiki/Signal_(IPC)
(see the part about "Risks" to see why they were a mistake). Use a word for an edge-triggered mechanism to describe a level-triggered mechanism is frighteningly like the kind of thinking that led to (i) react hooks and (ii) people thinking react hooks are acceptable so I am still a little terrified... But hey, I wrote a very complex knowledge graph editor in GWT (same async communication as Javascript) before many of you were in elementary school.