-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
localForage support #3
Comments
Ah, will have to make some changes for that. Let me add this to my todo. |
Same problem here. |
I'm also interested in this! It seems the best way of enhancing this awesome package. |
So I will make restoreState and saveState async functions (change their signatures to |
Any news about that ? |
If yah don't get around to it, will probably tackle this too @championswimmer :) |
@championswimmer can I expect it soon? |
Edit: @gijo-varghese, as new VuexPersistance({
storage: localforage,
saveState: (key, state, storage) => Promise.resolve(storage.setItem(key, state)),
restoreState: (key, storage) => Promise.resolve(storage.getItem(key))
}) |
@gijo-varghese use v0.5.0 You simple need to use new VuexPersistence({
storage: localforage
}) |
Is localForage is ready to work with vuex-persist? I tried to use localforage for storing dala loacally and to work offline. When I use localforage with vuex-persist data is storing and when I refresh the page all data stored is lost and is reset to initial values. What could be the reason? But it is working when I change that to localstorage. |
I am experiencing the same, have you found the reason? |
@TimonPost @to-svarghese example:
This should probably set as default value when |
this worked!, thx @ulf1 |
Hi Arnav,
first of all, thank you for releasing vuex-persist.
You mention on your readme that localforage is supported.
However,
new VuexPersistance(storage: localforage})
doesn't work - it surfaces an error related to localforage being asynchronous (VuexPersistance is trying to JSON decode a JS promise).Any tip how to make this work?
The text was updated successfully, but these errors were encountered: