UNPKG

nedux-logger

Version:

the next redux state management

8 lines (7 loc) 344 B
import { Store } from 'nedux'; declare type DefaultState = { [key: string]: any; }; export declare type Setter<T> = (value: T | ((prevValue: T) => T)) => void; export declare const createStoreHook: <T extends DefaultState, K extends keyof T = keyof T>(store: Store<T, K>) => <U extends K>(key: U) => [T[U], Setter<T[U]>]; export {};