State Management Pattern
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
new Vue({ // state data () { return { count: 0 } }, // view template: ` <div>{{ count }}</div> `, // action methods: { increment () { this.count++ } } }) |
You cannot directly mutate the store’s state. The only way to change a store’s state is by explicitly committing mutations.
mapState
Getters
mapGetters
Mutations ( 변이 )
Actions
Modules
14 thoughts on “vuex”
Comments are closed.