UNPKG

react-store-context-hooks

Version:

Provides various data store hooks that allow functional components to share the application state within the same React Context or different React Context using persistent storage.

9 lines (8 loc) 475 B
export function isEmpty(value: any): boolean; export function useLocalStore(key: string, defaultValue: any): Array<mixed>; export function useLocalStores(): {}; export function useSessionStore(key: string, defaultValue: any): Array<mixed>; export function useSessionStores(): {}; export function useStore(key: string, defaultValue: any, persistence: Storage): Array<mixed>; export function useStores(persistence: Storage): {}; export function withStore(Component: any): any;