function with this.state in react js code example
Example: reading state react
<button onClick={() => this.setState({ count: this.state.count + 1 })}>
Click me
</button>
<button onClick={() => this.setState({ count: this.state.count + 1 })}>
Click me
</button>