|
|
|
|
|
by slmjkdbtl
555 days ago
|
|
I think the class era is a decent, normal, boring and useful UI framework, however hooks are very difficult to use: - How things actually work are very hidden and unintuitive - Very easy to make mistakes, easy to write low performance UI - High cognitive load, constantly thinking about how many times things run, what's in dependency arrays, what should go in useCallbacks and useEffect etc - Overused, part of community sometimes encourage people to use React and some dependencies that's unnecessary for the project, only adding overhead and complexity - Easy to mix business logic with UI logic |
|
I work with mobx at work which just does a better job of letting us focus on business logic. Components observe computed models directly, no prop drilling, no context. The `createTransformer` map function is the key to mapping dynamic collections to computed models, handles GC in cases where you want to go from computed model to another computed model so you don't manage a bunch of WeakMaps yourself.
The React maintainers and community buy into complexity too readily. Probably why SolidJS (which unlike mobx also provides the view layer) is gaining traction.