mico-store
v1.0.2
Published
| type | size | | ------ | ---- | | min.js | 1kb | | gzip | 300b |
Downloads
8
Readme
nano-store
| type | size | | ------ | ---- | | min.js | 1kb | | gzip | 300b |
Install
$ npm install --save mico-store
Use
import micoStore from 'mico-store';
const store = micoStore({
name: 'dog',
age: 5,
});
const unListen = store.listen(state => {
console.log(state); // {name:'cat', age: 5}
});
store.setState({
name: 'cat',
});