B
B
bormor2019-05-21 11:59:25
JavaScript
bormor, 2019-05-21 11:59:25

Vuex - how to use mapAction with this handy way?

Colleagues, tell me, please - I use mapActions for vuex in the following scheme:
...mapActions([
'user/setUser'
]),
For some reason it doesn't work. Only works like this:
...mapActions('user', [
'setUser'
]),
What could be the reason?
(focused on this section of the docs https://vuex.vuejs.org/guide/modules.html#binding-...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2019-05-21
@bormor

...mapActions({
setUser: 'user/setUser'
}),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question