store-unit
v1.0.4 store reactive
store-unit
A watchable store unit
Install
npm install store-unit
Getting 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();