Closed
Description
First off... looks great!!
In the example you are using mapActions
, but not mapState
message () {
return `Counter: ${this.$store.state.counter.count}`;
},
surprise () {
return (this.$store.state.counter.count >= 5);
},
vs
...mapState({
message: state => `Counter: ${state.counter.count}`,
surprise: state => state.counter.count >= 5
})
also I noticed that we need to actually inject the store into the Vue
object, which doesn't appear to be necessary in normal vuejs so you might want to highlight what is happening there and why
Vue.prototype.$store = store;
Metadata
Metadata
Assignees
Labels
No labels