Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants