DEV Community

Discussion on: Clean Architecture on Frontend

Collapse
 
92srdjan profile image
WingsDevelopment • Edited

Hello Alex, I loved your article, and I am planning to use this architecture in huge enterprise project. I have some concerns about redux & redux-toolkit paradigm that is recommended from their documentation.
So if I understood your plan correctly in your domain you define your interface OrdersStorageService, that requires 2 things, some state, and some callback for setting the state. But then you end up with 1 reducer in redux? Because if you have single callback per model, then I assume you will end up with 1 reducer by slice, which is 'not recommended' or maybe I'm just paranoid and that's totally fine ?
I even posted full question in stackoverflow, you can find it here: stackoverflow.com/questions/716495... where I am trying to Implement your architecture with react + redux-toolkit, local state, and custom hook store.

Collapse
 
bespoyasov profile image
Alex Bespoyasov

Hey!

So, I've noticed the same question in the issue in the repository and answered it right there, if you don't mind: