///
import * as React from 'react';
export interface AsyncRouteComponentProps {
isInitialRender: boolean;
setAppState: (data: any) => void;
}
export interface AsyncRouteComponentState {
Component: React.ReactNode | null;
}
/**
* Returns a new React component, ready to be instantiated.
* Note the closure here protecting Component, and providing a unique
* instance of Component to the static implementation of `load`.
*/
export declare function asyncComponent({loader, Placeholder}: {
loader: () => Promise;
Placeholder?: React.ComponentType;
}): {
new (props: any): {
componentWillMount(): void;
updateState(): void;
render(): JSX.Element | null;
setState(state: AsyncRouteComponentState | ((prevState: Readonly, props: any) => AsyncRouteComponentState | Pick) | Pick, callback?: (() => void) | undefined): void;
forceUpdate(callBack?: (() => void) | undefined): void;
props: Readonly<{
children?: React.ReactNode;
}> & Readonly;
state: Readonly;
context: any;
refs: {
[key: string]: React.ReactInstance;
};
};
load(): Promise;
getInitialProps(ctx: any): any;
};