@ailjc/micro-sub
v0.3.0
Published
微前端方案应用接入
Downloads
7
Maintainers
Readme
@micro-web/sub
@ailjc/micro-app
微应用解决方案 子应用定义
Install
pnpm i @ailjc/micro-sub
Useage
import { defineMicroApp } from '@ailjc/micro-sub';
import App, { AppProps } from './App';
export default defineMicroApp(container => {
function render(props: AppProps) {
ReactDOM.render(<App {...props} />, container);
}
return {
mount: render,
render: render,
unmount() {
ReactDOM.unmountComponentAtNode(container);
},
};
});