-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(en): use case for option function in defineStore #1309
base: v2
Are you sure you want to change the base?
docs(en): use case for option function in defineStore #1309
Conversation
✅ Deploy Preview for pinia-official ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This example could be useful for a cookbook entry |
abb6d95
to
ba2b79e
Compare
Thank you for your response. I've changed it to be a cookbook entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this pr looks misleading to me - I was wandering around to find some solution for dynamic store registration (implying passing different store ids
to the factory function) and got here.
This pr, as I can see, better explains how stores handle states rather than how to create them dynamically. I think the contents should be refactored to better match the pr point.
|
||
We can have a creator function like this | ||
|
||
```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this example, there should be ts
if you want to use type annotations. Nothing critical, but the formatting would be a little bit better
No description provided.