egoist
12/19/2016 - 10:50 AM

elx.js

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)
  }
}