|
|
|
|
|
by iamflimflam1
845 days ago
|
|
Can't help but agree. It's very hard, even for experienced developers, to understand what is going on with hooks. Even knowing why they are needed requires a deep understanding of what is happening. Definitely feels like complex implementation details leaking upwards and influencing the public API. |
|
I’ve worked on many projects that implemented object-oriented programming in C, and the impedance mismatch there was much more tolerable. That should be a warning signal that something is amiss with hooks in JS.
They made an embedded language extension for JSX. Why not a similar separate language for hooks, to clearly delineate when you’re working with the React state machine rather than ordinary JS state?