We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use storeToRefs far more often than not, and it would be nice if there was a way to make it the default behavior.
storeToRefs
For example, I want to simplify the store usage from this:
const { posts, loading, error } = storeToRefs(usePostStore()) const { fetchPosts } = usePostStore()
To this:
// no storeToRefs call, get actions too const { posts, loading, error, fetchPosts } = usePostStore()
const usePostStore = defineStore("post", () => {}, { asRefs: true })
Some option when defining the store that will eliminate the need to call storeToRefs.
Global pinia config option?
The text was updated successfully, but these errors were encountered:
Don't use storeToRefs
Sorry, something went wrong.
Duplicate of #718
You can use #718 (comment).
Please, search existing issues and pull requests before opening issues, it saves maintainers a lot of time 🙏
No branches or pull requests
What problem is this solving
I use
storeToRefs
far more often than not, and it would be nice if there was a way to make it the default behavior.For example, I want to simplify the store usage from this:
To this:
Proposed solution
Some option when defining the store that will eliminate the need to call
storeToRefs
.Describe alternatives you've considered
Global pinia config option?
The text was updated successfully, but these errors were encountered: