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)