@ekwoka/preact-global-state
Version:
Global State for Preact. With Types!
6 lines • 384 B
TypeScript
import { Signal } from '@preact/signals';
import { StateUpdater } from 'preact/hooks';
export declare const Store: (initialValues: Record<string, unknown>) => void;
export declare const useGlobalSignal: <T>(key: string, defaultValue?: T) => Signal<T>;
export declare const useGlobalState: <T>(key: string, defaultValue?: T) => [T, StateUpdater<T>];
//# sourceMappingURL=index.d.ts.map