vue-local-storage
vue-local-storage copied to clipboard
Support for clear() method
The library does not include the clear() method so we can clear all data. (window.localStorage.clear())
See #40
Hi team,
First, congrats for this lib! It's very useful!
I see the solution with "window.localStorage.clear()" in issue #40, but has a difference with a self implementation. Using clear from native JS will delete all the data structure declared in App.vue. This is a problem in some sittuations, e.g., if you need to clear storage data from an authenticated user to change for other. In moment of second user login, the structure does not exists anymore, and reports a error like: Expected a number. In true, the references is now undefined.
Thanks for any enhance.