Vuex talk about what kinds of state property and

vuex process

Page to submit events to the action by mapAction asynchronous. By the action corresponding to the parameters of the synchronous commit submitted to mutation

mutation modifies the value of the corresponding state. Finally, the getter run out corresponding value in the calculation of the properties of the page by

mapGetter dynamically acquire the state value of

vuex which has several states and properties

There are five kinds of State, Getter, Mutation, Action, Module (that is, mapAction)

State characteristics vuex is?

stae where data is stored, similar to a warehouse, feature is when mutation modifies the data state of the time,

He will go to dynamically modify all call this variable the values ​​of all the components inside (if the data store is changed, the component will rely on this data update occurs)

Getter characteristics vuex is?

getter for acquiring data, mapgetter are often used in the calculation of the properties

Mutation characteristics vuex is?

Action similar mutation, except that:

Action is submitted mutation, rather than directly change state.

Action may include any asynchronous operation

vuex advantage

1 state management tool core is responsive to do data management, a data page changes occur. Dynamically change the corresponding page

There are a large number of components for communication between the brothers, the proposal must use VUEX, regardless of large projects and small projects

Guess you like

Origin www.cnblogs.com/gt721322/p/12093057.html