In the React docs page on handling events, it says:
Generally, if you refer to a method without () after it, such as onClick={this.handleClick}, you should bind that method.
I'm not clear on the difference between onClick={this.handleClick}
and onClick={this.handleClick()}
or why using the ()
means you wouldn't need to bind this
.
Any help in understanding would be greatly appreciated.