If the callback that defines the store is an async function, the return value obtained externally will be undefined. Why? #2294
-
![]() ![]() ![]() Does it not support async function? No corresponding description was found in the documentation. |
Beta Was this translation helpful? Give feedback.
Answered by
posva
Jul 3, 2023
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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