Skip to content

If the callback that defines the store is an async function, the return value obtained externally will be undefined. Why? #2294

Closed Answered by posva
ugCrying asked this question in Help and Questions
Discussion options

You must be logged in to vote

The function of a setup store cannot be async, it must return an object with the properties (https://pinia.vuejs.org/core-concepts/#Setup-Stores) not a promise

Replies: 1 comment 1 reply

Comment options

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

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