by thrwy_918 · 4y ago · 0 comments
This obviously doesn't work with vanilla hooks, but is there a way to achieve this pattern? It seems like it would be so light and fast compared to a heavier solution
EDIT: I threw together a small example if it helps: https://gist.github.com/chrisfosterelli/2e523b4beae43f056249...
It's slightly overengineered in that not everything has to be in separate files; I just reduced this from an an existing example that was more complicated and had this file structure already.
- I created Redux Toolkit :)
- It's also "official", ie, from the actual Redux team (myself, Lenz Weber, Tim Dorr)
- RTK simplifies common Redux patterns, but tries to stay "typically Redux". It doesn't hide the fact that you're using Redux. Libraries like Easy-Peasy and Rematch add additional levels of abstraction, to the point that it doesn't even look like Redux any more. I can understand why that might be appealing to some folks, but I think it's too much abstraction.