UNPKG

@sentre/react-dynamic-remote-component

Version:

Allows you to dynamically load a component from a remote using webpack 5's module federation.

10 lines (9 loc) 403 B
import { FC } from "react"; import { RemoteModule } from "./types"; export declare type RemoteComponentProps = RemoteModule & { unLoadScriptOnUnmount?: boolean; exportName?: "string"; }; export declare const getModule: (remoteModule: RemoteModule) => any; export declare const useRemoteModule: (remoteModule: RemoteModule) => any; export declare const RemoteComponent: FC<RemoteComponentProps>;