vue-data-stash
Save component data for rainy day
What?
This small mixin allows you to define stashable data in your components i.e. data that will be saved until next time when component will be used.
Why?
I'm bored to write localStorage.setItem
for every time I need to save some data.
Install
Install via NPM:
npm install vue-data-stash
Add it globally:
Vue
Or in a single component:
mixins: mixin
Usage
Just add stash
property like it's just data
:
name: 'MyComponent' activeId: true
NOTE: Name for localStorage is based on the
name
option