There should be universal mechanism to get component's props:
in markup:
<x-clock id="clock" data-type="digital" ></x-clock>
in code:
import {Component} from '@micro-frontends/core'
export class XClock extends Component {
static getName() {
return 'x-clock'
}
render() {
const id = this.props.id;
if (this.props.type == 'digital') {
//render digital clock
} else {
//render analog clock
}
}
}
There should be universal mechanism to get component's props:
in markup:
in code: