Homepage
Sign in / Sign up
Go to the profile of Andreas Köberle
Andreas Köberle
May 5, 2016
Shouldn’t this be just onClick without the underscore?
Andreas Köberle
2

Yes but the click handler adds the function without the underscore, so how does this work? Is this some kind of react magic?

  render() {
return <button onClick={this.onClick} />;
}
  • Go to the profile of Andreas Köberle

    Andreas Köberle

    • Share
    Go to the profile of Andreas Köberle
    Never miss a story from Andreas Köberle, when you sign up for Medium. Learn more
    Never miss a story from Andreas Köberle