can't return promise as state #1184
Unanswered
baixiaoyu2997
asked this question in
Help and Questions
Replies: 1 comment 2 replies
-
since promises are not serializable, they need special treatment if you need them on server and client side like in your example. You can use https://pinia.vuejs.org/api/interfaces/pinia.DefineStoreOptions.html#hydrate to customize how the state is hydrated |
Beta Was this translation helpful? Give feedback.
2 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.
-
Reproduction
https://codesandbox.io/s/deorderbook-njtv83?file=/composables/useWallet.js
Steps to reproduce the bug
look Reproduction
Expected behavior
store return promise state
Actual behavior
return blank object
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions