UNPKG

@wener/ui

Version:

12 lines (11 loc) 522 B
import React from 'react'; export interface ContainerProviderProps<State = void> { initialState?: State; children: React.ReactNode; } export interface Container<Value, State = void> { Provider: React.ComponentType<ContainerProviderProps<State>>; useContainer: () => Value; } export declare function createContainer<Value, State = void>(useHook: (initialState?: State) => Value): Container<Value, State>; export declare function useContainer<Value, State = void>(container: Container<Value, State>): Value;