in packages/react/react-application/src/index.tsx [105:138]
public componentDidMount() {
this.addThingToDo('mount', async () => {
if (this.props.appWillMount) {
await this.props.appWillMount();
}
const { sandbox } = this.props;
let domElement;
if (this.el) {
domElement = this.el
} else {
throw new Error('React dom element is no prepared. please check')
}
const appInfo = {
dom: domElement,
...this.getAppOption()
};
this.app = await createMicroApp(appInfo, { sandbox })
// @ts-ignore
await load(this.app);
// @ts-ignore
await mount(this.app, appInfo);
this.setState({
loading: false
});
this.props.appDidMount && this.props.appDidMount();
})
}