How to reset a store with one action's method #1692
Unanswered
Trandx
asked this question in
Help and Questions
Replies: 2 comments
-
I don't want to write a code like... |
Beta Was this translation helpful? Give feedback.
0 replies
-
you can just call |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello guys.
I want to write one method that can reset my store directly in a auth store file.
`
import {defineStore} from "pinia"
export const useAuthStore = defineStore("auth", {
state: () => ({
auth:{
authenticated:false,
user:{},
sessionExpireAt: null,
}
})
`
Beta Was this translation helpful? Give feedback.
All reactions