import { define, WeElement, h } from 'omi'
define('my-counter', class extends WeElement {
render() {
return (
<h.f>
<span>{this.count}</span>
{/* auto ignoreAttrs obj*/}
<my-child obj={{ name: 'omi' }}></my-child>
</h.f>
)
}
})
define('my-child', class extends WeElement {
static propTypes = {
obj: Object
}
render(props) {
return (
<h.f>
<span>name:{this.props.obj.name}</span>
</h.f>
)
}
})