I need to execute 2 functions based on one onClick event. for this, I found some methods Via stackoverflow. (Referred Call multiple functions onClick ReactJS)
But, in my case if I specified as onClick={this.handleClick}
works as expected. But if I specified as onClick={(event) => {this.handleClick()}}
, when clicking on button nothing happens. What could be the reason for this?
What is the optimal way of calling two functions one by one on one onClick where second function call depends on the result of first function call.