2017-01-28 20:11:31 -08:00

23 lines
533 B
Plaintext

class {
onInput() {
this.state = {
clickCount: 0
};
}
handleButtonClick() {
this.state.clickCount++;
}
}
div
h1 -- Hello ${input.name}!
div.colors
ul if(input.colors.length)
for(color in input.colors)
li.color style="background-color: ${color}"
-- ${color}
div else
-- No colors!
button type="button" onClick('handleButtonClick')
-- You clicked the button ${state.clickCount} time(s)