Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 349 Bytes

README.en.md

File metadata and controls

16 lines (13 loc) · 349 Bytes

Vue2 generic state management with localStorage

// Save in `store.state` and `localStorage.setItem`, and make it Vue reactive
window.store.set("item", item);
// Get from `store.state` or `localStorage.getItem`
window.store.get("item");
// Get from `store.state` only (ignore localStorage)
window.store.state.item;