I'm using React JS and Ant Design for my project.
Problem
I'm creating virtual DOM element. It has Popover
In that there is Button
and then clicking that showing Modal
.
It showing error Cannot read property 'setState' of undefined
JS Code
content = (
<div className="RecurringPopover">
<button onClick={this.showModal}> Show Modal </button>
</div>
);
Full Code on StackBlitz