Created
December 19, 2016 10:50
-
-
Save egoist/75901632b3b21a3e1069ef931b38038f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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