No examples with arrays in the docs? #934
Answered
by
posva
rodrigocfd
asked this question in
Help and Questions
-
I was looking for an example of how to store an array in a store, and after read through the whole documentation, I found zero examples. Examples using arrays would greatly help the newcomers. |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Dec 31, 2021
Replies: 1 comment 2 replies
-
You just use an array like any other variable in JS: defineStore('id', {
state: () => ({ list: [] })
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rodrigocfd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You just use an array like any other variable in JS: