import useCustomRemoteHook from 'remote1/useCustomRemoteHook'; // function RemoteHookText() { // // @ts-ignore ignore // const RemoteText = React.lazy(async () => { // //@ts-ignore // const useCustomRemoteHook = await loadRemote('app2/useCustomRemoteHook') as ()=>string; // console.log(111,useCustomRemoteHook) // const text = useCustomRemoteHook.default(); // console.log(23424,text) // return text; // }); // return ( // //
{RemoteText}
//
// ); // } const TestRemoteHook = () => { const text = useCustomRemoteHook(); return ( <>
Page with custom remote hook. You must see text in red box below:
{text}
); }; export default TestRemoteHook;