Closed BigGaoYep closed 3 years ago
import React from 'react'; import ReactDOM from 'react-dom'; import App from "./model"; import { MicroModule, registerModules } from '@ice/stark-module';
registerModules([ { // render: () => , // name: 'module-demo1', name: 'module-demo1', url: 'http://localhost:3002/helloApp.js', mount: (ModuleComponent, mountNode) => { ReactDOM.render(, mountNode); }, }, ]);
ReactDOM.render(
@maoxiaoke
你可以使用
$ iceworks init component @icedesign/template-icestark-module
更多内容可参考官方文档 https://ice-lab.github.io/icestark/guide/micro-module
import React from 'react'; import ReactDOM from 'react-dom'; import App from "./model"; import { MicroModule, registerModules } from '@ice/stark-module';
registerModules([ { // render: () => ,
// name: 'module-demo1',
name: 'module-demo1',
url: 'http://localhost:3002/helloApp.js',
mount: (ModuleComponent, mountNode) => {
ReactDOM.render( , mountNode);
},
},
]);
ReactDOM.render(