class {
  onCreate() {
    this.state = { count:0 };
  }
  increment() {
    this.state.count++;
  }
  onDestroy() {
    console.log('click-count onDestroy');
  }
}

<div.count>
  ${state.count}
</div>
<button.example-button on-click('increment')>
  Click me!
</button>
