Timeout in Action #1305
Unanswered
nikkioon
asked this question in
Help and Questions
Replies: 2 comments 4 replies
-
you need to make sure the action is awaited in your server wherever the action is called: const delay = t => new Promise(r => setTimeout(r, t))
async myAction() {
await delay(500)
// custom code
}
// somewhere
await store.myAction() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thx for the response but i dont think thats the Problem. Thanks again for the help |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi im working on a Nuxt 3 Project.
Im using a Timeout in my Pinia Action like the Example:
When i write the Action like that i get a h3 error

Is anything wrong with my way? Is there another way to use Timeout and Interval in Pinia?
Beta Was this translation helpful? Give feedback.
All reactions