Guards against spurious state mutation or side effects in pinia
actions
#2329
Unanswered
tafadzwagonera
asked this question in
Help and Questions
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR Are guards in
pinia
actions justified or there's a better way to guard against spurious state mutations or side effects withpinia
?I've a simple store that manages state on front-end while keeping that state in sync with persistent state on the server. The store has a dependency on
useCustomFetch
, a composable wrapping the built-inuseFetch
, which it uses to call an API exposing CRUD operations. In the event that a call to the endpoint fails I'd like to guard against spurious state mutations or side effects.Beta Was this translation helpful? Give feedback.
All reactions