Add examples setting type of initially empty state #482
Closed
theoephraim
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Yes, that's the recommended way. Definitely worth adding to the documentation in the state page! If you want you can do a PR |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just started using pinia and loving it so far.
One quick suggestion - add examples showing how to set TypeScript types on state properties that may initially be empty or are not simple enough to infer.
For example
I assume that is the suggested way to do this? I stumbled upon it in some random issue and it seems obvious now, but I think would definitely be helpful to mention it in the docs.
Beta Was this translation helpful? Give feedback.
All reactions