react-pusher-hoc
Version:
Higher-Order Component for handling incoming [pusher.com](https://pusher.com) events like a charm.
12 lines (11 loc) • 446 B
TypeScript
import * as React from 'react';
export declare const PusherProvider: React.Provider<{}>;
interface FunctionsMap {
[s: string]: (event: any, state: any, props: any) => Object;
}
interface IncomingProps {
mapPropsToValues: (props: any) => Object;
events: FunctionsMap;
}
declare const withPusher: (config: IncomingProps) => <P extends object>(WrappedComponent: React.ComponentType<P>) => React.ComponentType;
export default withPusher;