origami-state-manager
Version:
A global state management library that is light and requires minimal boilerplate. OSM stands out for its ability to seamlessly access and update global states from both React and non-React environments.
14 lines (10 loc) • 490 B
TypeScript
declare const createStore: (store: Record<string, any>, storeName?: string) => Record<string, {
value: any;
subscribe: (subscriber: (value: any) => void) => void;
}>;
declare const useStateListener: (stateName: string, store: Record<string, any>) => any;
declare const stateValue: (stateName: string, store: Record<string, {
value: any;
subscribe: (subscriber: any) => void;
}>, value?: (state?: any) => any) => any;
export { createStore, stateValue, useStateListener };