@berish/stateful-react-connect
Version:
ReactJS connector for @berish/stateful state managment
9 lines (8 loc) • 772 B
TypeScript
import * as React from 'react';
import { StatefulObject } from '@berish/stateful';
declare type ClassConnectorType = <TComponent extends new (...args: any[]) => React.Component>(component: TComponent) => TComponent;
declare type FunctionConnectorType = <Props>(component: React.FunctionComponent<Props>) => React.FunctionComponent<Props>;
export declare function connect(stores: StatefulObject<object>[]): ClassConnectorType & FunctionConnectorType;
export declare function connect<TComponent extends new (...args: any[]) => React.Component>(stores: StatefulObject<object>[], component: TComponent): TComponent;
export declare function connect<Props>(stores: StatefulObject<object>[], component: React.FunctionComponent<Props>): React.FunctionComponent<Props>;
export {};