store-unit
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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();

Readme

Keywords

Package Sidebar

Install

npm i store-unit

Weekly Downloads

113

Version

1.0.4

License

MIT

Unpacked Size

23.5 kB

Total Files

14

Last publish

Collaborators

  • everdimension