Skip to content

Instantly share code, notes, and snippets.

@santosoide
Created April 24, 2017 10:53
Show Gist options
  • Save santosoide/1f6db957ce4db0c8d0e118a42df233bf to your computer and use it in GitHub Desktop.
Save santosoide/1f6db957ce4db0c8d0e118a42df233bf to your computer and use it in GitHub Desktop.
class {
onCreate() {
this.state = { count:0 };
}
increment() {
this.state.count++;
}
}
style {
.count {
color:#09c;
font-size:3em;
}
.example-button {
font-size:1em;
padding:0.5em;
}
}
<div.count>
${state.count}
</div>
<button.example-button on-click('increment')>
Click me!
</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment