I am trying to refactor the following code from my render view:
The problem is certainly the this binding while rending the button with onClick handler. The solution is to use arrow function while calling action handler while rendering. Like this: onClick={ () => this.handleButtonChange(false) }
onClick={ () => this.handleButtonChange(false) }