1π
β
It looks like you tried to map setRegisterEmail
in your component, but youβve incorrectly added it to the root of the component definition:
export default {
// β invalid component option
...mapMutations('authentication', [
'setRegisterEmail',
'setRegisterPassword',
]),
// β invalid component option
...mapActions('authentication', [
'register',
]),
};
To properly map mutations and actions with mapMutations
and mapActions
, put them under the methods
option:
export default {
π
methods: {
...mapMutations('authentication', [
'setRegisterEmail',
'setRegisterPassword',
]),
...mapActions('authentication', [
'register',
]),
}
};
π€tony19
Source:stackexchange.com