|
|
|
|
|
by recursive
616 days ago
|
|
Another react hater here. Here are some of my beefs. * Components don't have exposed identities, but component state is based on identity. Secretly they're fibers.
* Everything is treated as if it's immutable. Reference equality is used to infer no changes. Working with array-based state, or almost anything really, is awkward and unnecessarily verbose. Spread all the things.
* The rules of hooks. These are just implementation constraints based on the rest of the design decisions of react.
* You can't use symbols as keys. This is small, but particularly irksome for me.
* The smallest unit of UI change is the component render function.
* Effect dependencies need to be listed explicitly.
There are more. |
|
Immutability is a great callout; frontend ecosystem is quite divisive on it.
For my flavor, as React exploded, redux and the advanced state management frameworks came and made everything bananas[1]. "It solves real problems for advanced apps"; maybe but I could never shake that these problems are self-inflicted.
There's a mathematical functional purity that's nerd-snipe worthy; but reactivity with mutation observers just seems to model the real world of UIs better.
Anyway, https://mobx.js.org/README.html is the exact opposite take: mutate your state! Subscribe to changes to your heart's content.
The divisiveness is real, it's what makes staying up to date exhausting.
[1] Come on, no one seriously thinks "bind action creators" made intuitive, ergonomic sense.