Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Replace the vuex-electron plugin #30

Closed
baruchiro opened this issue Jan 1, 2020 · 4 comments
Closed

Replace the vuex-electron plugin #30

baruchiro opened this issue Jan 1, 2020 · 4 comments
Labels
enhancement New feature or request security

Comments

@baruchiro
Copy link
Owner

The vuex-electron package is not under maintaining anymore.

In this app, we need more attention about persisting the vuex state, because we have to keep the sensitive data (passwords, keys) out of the persistent file (unless we keeping the whole persistent safe).

So this issue requires looking for maintained, customizable and secured Vuex plugin, or developing our own plugin.

@baruchiro
Copy link
Owner Author

Alternatives:

@baruchiro baruchiro mentioned this issue Jan 13, 2020
Arielgordon123 added a commit that referenced this issue Jan 13, 2020
@Arielgordon123
Copy link
Collaborator

the vuex-persistedstate package saves and read from the local storage by default, so it is easier to integrate it into our app.

theelectron-store lets you store JSON Objects to file so the data will be saved to disk but then you need to update the vuex store on every change.

there is an advantage to electron-store like mentioned here

local storage is limited to 10MB vs 4096 bytes on cookies.

baruchiro pushed a commit that referenced this issue Jan 13, 2020
@baruchiro
Copy link
Owner Author

vuex-persistedstate:
I'm not sure we can use local storage in Electron, and I'm not sure it will save the state between sessions.
But vuex-persistedstate support custom source, so we can use something even better then save and load the whole db file for each time the store changes.

And I just realized how it works!

The vuex-persistedstate uses local storage to save the vuex state.
And the electron-store implement the local storage interface, for saving in the filesystem.

So it seems obvious, we need to use vuex-persistedstate with electron-store as custom storage.

But keep it in mind, maybe it is overkill.

@baruchiro
Copy link
Owner Author

Closed, replaced in https://github.com/brafdlog/budget-tracking

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request security
Projects
None yet
Development

No branches or pull requests

2 participants