React and redux, vue and vuex, I have used both frameworks and their state management mechanisms. I found that although redux and vuex are written in similar ways, they are basically the same and very similar. After all, they both evolved from flux. I would like to ask. Doesn't Angular have a similar state manager? How does angular do it?
大家讲道理2017-05-16 13:20:47
I don’t know if you are talking about angularJs or Angular (that is, Angular2.0 in a general sense).
First of all, redux is an architecture, which does not mean it must be combined with React. The angular system also has corresponding state management, such as The angularJS version of ng-redux and Angular's ngrx-store. These are all implementations based on the redux architecture. You only need to use them in your own projects according to their instructions. In addition, there has always been an important concept in the angular system: service. Introducing redux-related tools into the project will definitely increase the complexity of the project. When your project does not require redux too much, you can also implement the state management function through a singleton service in the project itself.