store-unit
v1.1.0
Published
A watchable data unit for UIs
Downloads
759
Readme
store-unit
A watchable store unit
Install
npm install store-unitGetting Started
import { Store } from "store-unit";
const initialValue = { count: 42 };
const store = new Store(initialValue);
const unlisten = store.on("change", (newState, previousState) => {
updateSomething(state);
});
// Stop listening:
unlisten();