pinia-plugin-persist
pinia-plugin-persist copied to clipboard
Persistence doesn't work well when using multiple pinia stores.
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",
}
I came across the same problem
I came across the same problem
maybe about this https://github.com/Seb-L/pinia-plugin-persist/pull/39
maybe about this https://github.com/Seb-L/pinia-plugin-persist/pull/38
I came across the same problem too!