react-native-portal
Version:
Translocate your render destination, using mitt. Built with react@16 and react-native in mind.
59 lines (58 loc) • 1.6 kB
TypeScript
import React from 'react';
import { Emitter } from 'mitt';
export declare class PortalProvider extends React.Component {
_emitter: Emitter;
static childContextTypes: {
portalSub: any;
portalUnsub: any;
portalSet: any;
portalGet: any;
};
state: {};
getChildContext(): {
portalSub: (name: any, callback: any) => void;
portalUnsub: (name: any, callback: any) => void;
portalSet: (name: any, value: any) => void;
portalGet: (name: any) => any;
};
componentWillMount(): void;
componentWillUnmount(): void;
portalSub: (name: any, callback: any) => void;
portalUnsub: (name: any, callback: any) => void;
portalSet: (name: any, value: any) => void;
portalGet: (name: any) => any;
render(): any;
}
export declare class BlackPortal extends React.PureComponent {
static contextTypes: {
portalSub: any;
portalUnsub: any;
portalSet: any;
portalGet: any;
};
props: {
name: string;
children?: ;
};
componentDidMount(): void;
componentWillReceiveProps(newProps: any): void;
componentWillUnmount(): void;
render(): null;
}
export declare class WhitePortal extends React.PureComponent {
static contextTypes: {
portalSub: any;
portalUnsub: any;
portalSet: any;
portalGet: any;
};
props: {
name: string;
children?: ;
childrenProps?: ;
};
componentWillMount(): void;
componentWillUnmount(): void;
forceUpdater: () => any;
render(): any;
}