github Tencent/omi v6.25.18
Auto ignoreAttrs when using h function

latest releases: v7.7.0, v7.6.18, v7.6.6...
14 months ago
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>
    )
  }
})

Don't miss a new omi release

NewReleases is sending notifications on new releases.