store-unit

v1.0.4
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();
npm i store-unit

Metadata

  • MIT
  • Whatever
  • everdimension
  • released 11/1/2023

Downloads

Maintainers