Skip to content

Typescript+pinia: Problem about type of this #1172

Discussion options

You must be logged in to vote

You can do

this.$state[key] = value

But I would recommend you not to create an action if it just sets a value:

store.name = newName
store.age = newAge

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YornQiu
Comment options

Answer selected by YornQiu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants