-
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
blacklist functionality broken? #19
Comments
I would like an update to this as well. |
@zciendor Update: |
vuex-electron存在很一个严重的问题。即使添加了blacklist,但是在下次非blacklist的commit的时候,还是会把所有的state进行持久化。鉴于vuex-electron已经不做维护,使用 MaverickMartyn/vuex-electron 作为替代 refs: vue-electron/vuex-electron#19 refs: vue-electron/vuex-electron#22 refs: https://github.com/MaverickMartyn/vuex-electron
First, let's look at what is working as expected:
This will never persist any state. However, this is a bit pointless as the same result could be achieved by not using the
createPersistedState
plugin at all.Now let's look at the case when blacklisting certain mutations, by providing a list of mutations:
Well, it's true that the state is not persisted when
ignoredMutation
is fired. However, the whole state will be persisted the next time a non-blacklisted mutation is triggered - which includes all the previous mutations, even the blacklisted ones. Basically you're only delaying persistence that way but not blacklisting it.So the question is: Is this implemented as designed? If yes, where's the point in that?
The only use I can imagine is that it allows you to blacklist certain mutations for performance reasons (e.g. in case they are triggered that often that you don't want to write to the persistence file every time). But I doubt that this is what users would expect based on the limited documentation.
The text was updated successfully, but these errors were encountered: