Closed yoyooyooo closed 1 year ago
bindReactRuntime({ React, ReactDOM })
需要第一时间调用,通常在入口文件第一行调用,见示例
https://codesandbox.io/s/demo-load-remote-react-comp-2bnpl0
我参考你这个例子改了一个,你可以看这个例子 https://codesandbox.io/s/naughty-kapitsa-e9ylji?file=/src/App.js
我参考你这个例子改了一个,你可以看这个例子 https://codesandbox.io/s/naughty-kapitsa-e9ylji?file=/src/App.js
这种方式preFetchLib获取的组件怎么使用呀? 定义了一个state, 把res设置进去,使用的使用报错,不是一个组件 const [Component, setComponent] = useState();
setComponent(res)
hel-tpl-remote-react-comps-ts
就是仓库里的模板,没做过改动