Answer the question
In order to leave comments, you need to log in
What to use Services or Global Repositories?
Good afternoon!
Why do we need global storages like Redux, Mobx, Vuex, etc., if we can move everything into services and store and manage business logic there?
Please share your opinion
Answer the question
In order to leave comments, you need to log in
Variables in services are not much different from global variables. In fact, these are global variables with all the ensuing consequences. For example, a service variable might change unexpectedly during some asynchronous action. Which will lead to unexpected/unwanted side effects. Modern OOP paradigms (for example, DDD) directly say that services should not store state.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question