react use states 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>