UNPKG

coolant

Version:

The modular build radiator

24 lines (23 loc) 974 B
import React, { FunctionComponent } from "react"; import { Provider } from ".."; export interface ConnectedDataProp<DataPropType> { readonly data: DataPropType; } export interface ConnectorProps<DataPropType> { readonly provider: Provider<DataPropType>; readonly updateIntervalSeconds?: number; } export interface ConnectorComponentProps<DataPropType, OtherProps> { readonly otherComponentProps: OtherProps; readonly component: FunctionComponent<ConnectedDataProp<DataPropType> & OtherProps>; } export declare class Connector<DataPropType, OtherProps> extends React.Component<ConnectorProps<DataPropType> & ConnectorComponentProps<DataPropType, OtherProps>, { readonly data: DataPropType | null; }> { private intervalId; constructor(props: ConnectorProps<DataPropType> & ConnectorComponentProps<DataPropType, OtherProps>); render(): JSX.Element; componentDidMount(): void; componentWillUnmount(): void; private updateState; }