I started using a new linter today (tslint-react) and it is giving me the following warning:
"Lambdas are forbidden in JSX attributes due to their rendering performance impact"
I get that this causes the a new function to be created with each render. And that it could trigger unneeded re-renders because the child component will think it's props have changed.
But my question is this, how else can one pass parameters to an event handler inside a loop:
customers.map( c => <Btn onClick={ () => this.deleteCust(c.id) } /> );