Is there any performance difference (or other differences that make one better than the other) between
Using arrow functions in render functions:
<SomeElement
onClick={() => this.updateSalesQuoteProgress(QuotationProgressState.Done)}
/>
private updateSalesQuoteProgress = (progress: QuotationProgressState): void => {
this.actionService.updateSalesQuoteProgress(this.props.project, progress);
};
Using partial application in render functions:
<SomeElement
onClick={this.updateSalesQuoteProgress(QuotationProgressState.Installed)}
/>
private updateSalesQuoteProgress = (progress: QuotationProgressState): (() => void) => {
return () => {
this.actionService.updateSalesQuoteProgress(this.props.project, progress);
};
};
If there is a difference, please explain why