-
Notifications
You must be signed in to change notification settings - Fork 96
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
Persist partial state #25
Comments
This is actually what this package does: https://github.com/robinvdvleuten/vuex-persistedstate with its options |
I've got a similar issue - I want some state persisted in memory to enable state to persist during only the app's current session. (Eg switching views, the state should be there still in the same session. But not when closing the app and opening it for another session) Eg I have a list of players that should only be stored in memory for that session:
But that data, even though it's in the blacklist, it's persisted.. |
I've ended up swapping out this repo for #22 |
The whole global state is persisted in the Store: https://github.com/vue-electron/vuex-electron/blob/master/src/persisted-state.js#L96
It would be nice to be able to only save parts of the state. We can easily imagine that some part of the state are transient (only relevant to the current execution of the application) and shouldn't not be persisted on disk (and not reloaded at startup).
On top of my mind changing
setState
like this could be sufficient:And because the loading operation do a deep merge with the initial state it should work seamlessly. Thoughts?
The text was updated successfully, but these errors were encountered: