Comment

Comment by Androider

Nowadays you can just stick a class property anywhere in your React component:

   handleSomething = (params) => {
     ...
   };
and the use it in your render function like this without any binding:

  <Foo onSomething={this.handleSomething}/>
parent Androider 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton