Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence doesn't work well when using multiple pinia stores. #36

Open
vannel opened this issue Apr 13, 2022 · 5 comments
Open

Persistence doesn't work well when using multiple pinia stores. #36

vannel opened this issue Apr 13, 2022 · 5 comments

Comments

@vannel
Copy link

vannel commented Apr 13, 2022

It works totally fine when there was only ONE pinia store in my application. After I added another pinia definition and it just went weird. It seems that there could be ONLY ONE store that can be persisted into the storage at a time, while others just freeze in the storage, no matter when any actions or $reset being called.
And pinia works fine, though. Just the persistence goes wrong.

// authStore.js
const useAuthStore = defineStore("auth", { ... })

// routerStore.js
const useRouterStore = defineStore("router", { ... })

Here are the dependencies in my package.json:

"dependencies": {
   // ......
    "pinia": "^2.0.0-rc.10",
    "pinia-plugin-persist": "^1.0.0",
    "vue": "^3.2.25",
  }
@q807175022
Copy link

I came across the same problem

1 similar comment
@L1150143576
Copy link

I came across the same problem

@Allen-1998
Copy link

maybe about this #39

@L1150143576
Copy link

@Jiangg21
Copy link

I came across the same problem too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants