Skip to content

everdimension/store-unit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A watchable data unit

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published