cache-store
数据缓存,支持 React 组件之间数据共享。
USAGE
var store = ; Component { superprops; store; // 触发 store 中的 name 值更新 } Component { superprops; thisstate = barName: ''; // 每次 store 中的 name 改变了, Bar 中的 barName 也会跟着改变 store; } { store; // 取消绑定 } { return <div>thisstatebarName</div> }
API
local
对 localStorage 对象的一个封装,支持任意类型的 value,同时支持设置过期时间