UNPKG

contextism

Version:

New way to use React Context

4 lines (3 loc) 269 B
import * as React from 'react'; export declare const useContext: <S>(context: React.Context<S | undefined>) => S; export declare const useStore: <S, D>(state?: React.Context<S | undefined> | undefined, dispatch?: React.Context<D | undefined> | undefined) => [S, D];