class { onInput() { if (!this.state) { this.state = { count: 0 }; } } increment() { this.state.count++; } }
Current count is ${state.count}