UNPKG

@bentoo/state-man

Version:

A lightweight package for state management in React applications, designed as a simplified alternative to Zustand and the Context API.

11 lines (10 loc) 242 B
import { Observer, Setter } from 'types'; interface IObservable { subscribe(observer: Observer): () => void; notify(): void; } interface IStore<T> { set(data: Setter<T>): void; get(): T; } export type { IStore, IObservable };