UNPKG

@rxx/core

Version:

React MVI micro framework.

21 lines (20 loc) 885 B
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { IntentHandler } from '../intent/intent-handler'; export declare type ConnectArgs<State, Props, I, S> = { mapStateToProps?(state: State, props: Props, component: React.Component<{ props: Props; state: State; }>): S; mapIntentToProps?(intent: IntentHandler, state: State, props: Props, component: React.Component<{ props: Props; state: State; }>): I; }; export declare const CONTEXT_TYPES: { intent: PropTypes.Requireable<any>; state: PropTypes.Requireable<any>; unobservablifiedStateGetter: PropTypes.Requireable<any>; parent: PropTypes.Requireable<any>; }; export declare function connect<Props = any, State = any, I = any, S = any>(args?: ConnectArgs<State, Props, I, S>): (C: React.ComponentClass<I & S>) => React.ComponentClass<Props>;