Comments (7)
Finally implemented and released it in V2 🎉
Closing this !
from pinia-plugin-persistedstate.
Hi thanks for opening the issue. I didn't specify it in the guideline or such, but I don't speak any Chinese :/ Could you rephrase the whole thing in English so I can help you ?
Thanks!
from pinia-plugin-persistedstate.
sorry, It's my thoughtlessness!
well, I mean this tool is very good。so that I hope it can be better。
for example:
I hope when I use defineStore of pinia , based on your expanded parameter -- persist,Its value can be an array(persist?: boolean | PersistedStateOptions | PersistedStateOptions[])。
because, Sometimes,all data in one store, hope can be persisted in different storage(localStorage, sessionStorage)
export const userStore = defineStore('user', {
state: () => {
return {
key1: '',
key2: ''
}
},
persist: [
{
key: 'piniaUserStoreInSession',
storage: window.sessionStorage,
paths: ['key1']
},
{
key: 'piniaUserStoreInLocal',
storage: window.localStorage,
paths: ['key2']
}
]
})
The above is through translation software, If there is any inaccuracy, I hope you will forgive me!
from pinia-plugin-persistedstate.
Ooooh I see it now, the example code helped a lot. The idea seems interesting. I'll consider it and try to implement this when i get some time. I'm just a bit concerned with performance but that would be documented.
(no worries as for English, it's more than i need to understand your problem!)
from pinia-plugin-persistedstate.
Hi, as I thought about implementing this, I came across an issue.
If a same paths is stored in different stores, how about rehydration? That would let the possibility to have 2 different sources of rehydration 🤔
from pinia-plugin-persistedstate.
Hi, as I thought about implementing this, I came across an issue. If a same paths is stored in different stores, how about rehydration? That would let the possibility to have 2 different sources of rehydration 🤔
It's nice to hear from you again.
can you list some scenes at work?
because, I think nobody use like this(a same paths is stored in different stores).
if It won't be used like that, maybe can throw a error to prevent the problem?
from pinia-plugin-persistedstate.
@zhuzhengshou or @prazdevs could one of you please change the issue title to English?
from pinia-plugin-persistedstate.
Related Issues (20)
- Having interval inside a persistent store breaks persisting
- [pinia-plugin-persistedstate] Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin HOT 2
- In the cookie store defineNuxtRouteMiddleware method was used in nuxt3 unable to get to the store of value HOT 3
- Critical security vulnerability? HOT 6
- nuxt bug Cannot read properties of undefined (reading 'sessionStorage') HOT 1
- Automatically set `Vary: Cookie` response header in Nuxt SSR
- pinia.use(piniaPersist) in a separate file, causing local storage to fail HOT 2
- Missing "./package.json" export HOT 1
- Not effective when working with vee-validate
- Global `cookieOptions` are not applied in Nuxt 3 HOT 1
- Type safe persist paths HOT 2
- Store not hydrated from cookies when used with `@nuxtjs/i18n` and `routeRules`
- Using store outside setup(), state persistence is not possible HOT 1
- The type of map print in console.log (typeof this.userMap) is object HOT 1
- Persist for "composition api" style HOT 1
- 配置 storage: persistedState.sessionStorage 会导致 v-bind 失效
- Vue: Argument of type HOT 2
- when to persist and when to recover
- How to Securely store an object in local storage without storing It as plain object? HOT 5
- not able to use persistence in plugins created from user modules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinia-plugin-persistedstate.