class { onInput(input) { this.state = { counter: input.value } } increment() { this.state.counter++; } }
Count: ${state.counter}