Skip to content

Instantly share code, notes, and snippets.

@egoist
Created December 19, 2016 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoist/75901632b3b21a3e1069ef931b38038f to your computer and use it in GitHub Desktop.
Save egoist/75901632b3b21a3e1069ef931b38038f to your computer and use it in GitHub Desktop.
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)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment