class { onCreate() { this.state = { count: 0 } } handleCountChange(value) { this.state.count = value } }