|
|
|
|
|
by seer
2052 days ago
|
|
While I totally agree that hooks reduce code size a lot, and have used them to great effect, the feeling that hooks are weird has not faded. I know exactly what they do, and usually help co-workers with weird edge cases, but I still have a feeling that we could do better. Anyway wanted to mention that since redux is so ridiculously tiny, its simple to actually nest it. Components can have local state, and only transmit global state on business related changes. Now with hooks and useState thats a bit more ergonomic, but you could do that way before hooks were introduced. |
|
Something I'm looking at right now is Effector. It encourages many smaller stores and allows for handling of effects quite easily. The smaller individual stores avoid the performance issues that people bring up often with Redux and I feel the API is more fluent, avoiding some of those boilerplate concerns, some of which are admittedly addressed by Redux Toolkit.
I'm not sure how my time with Effector is going to play out but I suspect it is at least the right idea. I wouldn't be surprised if a similar library came out that was embraced more by the community