store-unit

v1.0.2
A watchable data unit for UIs
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();

Metadata

  • MIT
  • Whatever
  • everdimension
  • released 4/27/2022

Downloads

Maintainers