import Elx, {h} from 'elx' class Button extends Elx { state = { count: 0 } increment = () => { this.set('count', this.state.count + 1) } render() { return h('button', {onClick: this.increment}, this.state.count) } }