3 ms·
The difficulty with react generally isn't the syntax. It's the constraints of hooks and reconciliation. Since mutation is always disallowed (but not by mechan
by recursive 2y ago
The difficulty with react generally isn't the syntax. It's the constraints of hooks and reconciliation. Since mutation is always disallowed (but not by mechanical constraints) data changes are harder to express. You have to remember to keep your effect dependency list synchronized even though the linter can tell you when it's wrong. State continuity depends on the heuristics of the reconciler considering this component instance (and all its parents) to be some particular component instance from a previous render function output.
The syntax is maybe the only good part of react. And I still think the way it uses JSX is not great. Conditionals and .map seem... weird.
But yes, judged from syntax only, react is ok.