1handleClick() {
2 this.setState(prevState => ({
3 isToggleOn: !prevState.isToggleOn
4 }));
5}
1handleClick() {
2 this.setState(prevState => {
3 return {
4 count: prevState.count + 1
5 }
6 })
7 }