-1

enter image description here

enter image description here

the error is TypeError: Cannot read property 'state' of undefined

1 Answers1

0

Hello inside actions and mutations you need to pass the state to function

First arg u get state action mutations, second one u pass a payload So your code should look like this

gatherine({ state}, payload)

Then you don't need to use this.state and directly use state

Zack Heisenberg
  • 499
  • 6
  • 12