redux-toolkit
redux-toolkit copied to clipboard
can it possible to optimise more boiler plate as like easy-peasy do?
I have used https://easy-peasy.vercel.app/ lib so far with no issues. can this library optimise usage as https://easy-peasy.vercel.app/ do?
As with Easy-peasy too much code is reduced compared to the redux toolkit.
Without any example of what you personally perceive as boilerplate, that is going to be difficult.
All I can say you at this point is that RTK is deliberately not hiding certain concepts as hiding them strongly couples things and makes things like testing a lot harder.
I mean this one. https://stackoverflow.com/questions/61944375/easy-peasy-vs-react-redux
yes I understand testing could be difficult
Can you show some specific code examples (preferably a few dozen lines) showing how to do the same thing in RTK vs Easy-Peasy, so we can understand what kind of code you are describing as "boilerplate"?
That linked SO answer just talks about using Immer for shorter immutable updates, and RTK already uses Immer inside. So, I don't know what other parts of RTK you feel take too much code.
I will get back as soon as possible
Closing due to lack of response.