Skip to content

Cannot update states using this in Pinia actions #1267

Discussion options

You must be logged in to vote

I believe I found the problem. If use the following syntax for defining actions, they execute without error:

actions: {
  setToken(token) {
     this.token = token
  },
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by col-bc
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants