UNPKG

zippy-store

Version:

A lightweight and versatile global state management solution designed for seamless integration in both JavaScript and React applications. Provides a simple and efficient way to manage shared state across components and even in non-React JavaScript environ

7 lines 480 B
type State = Record<string, any>; type Actions = Record<string, (...args: any[]) => any>; declare const create: <T extends State, A extends Partial<Actions> = object>(storeKey: string, stateAndActionsFn: (set: (newStateCb: ((state: T) => Promise<Partial<T>> | Partial<T>) | Partial<T>) => void, get: () => T) => T & A, persist?: boolean) => <S extends Partial<T>>(selector?: (state: T) => S) => S & { dispatch: A; }; export default create; //# sourceMappingURL=create.d.ts.map