by jmschlmrs · 9y ago · 0 comments
The only annoyance is dealing with binding event handlers to items/components in a list. Generally you need to abstract the list item into it's own component and do the event handler binding there.
I don't use .bind() anywhere in my react code.
They do. Just do:
myHandler = (v) => {
...
}
and you don't need to bind in the constructor anymore. You'll need to use Babel of course to transpile that. handleSomething = (params) => {
...
};
and the use it in your render function like this without any binding: <Foo onSomething={this.handleSomething}/>