React remove click event using jQuery


(JustBreak) #1

I have a tag that has onClick property. How can I remove the event from the tag using jQuery? is that even possible?


(JustBreak) #2

Override the event.

It is not recommended to mix jQuery and react but if you are about to change 1000000 files, this should be the last (hacky) goto.

<button onClick={this.props.handleClick}>click me</button>

var elem = $('.yourbutton');
elem.click(() => { return false });