I\'m running lint with my React app, and I receive this error:
error JSX props should not use arrow functions react/jsx-no-bind
A
Using inline functions like this is perfectly fine. The linting rule is outdated.
This rule is from a time when arrow functions were not as common and people used .bind(this), which used to be slow. The performance issue has been fixed in Chrome 49.
Do pay attention that you do not pass inline functions as props to a child component.
Ryan Florence, the author of React Router, has written a great piece about this:
https://cdb.reacttraining.com/react-inline-functions-and-performance-bdff784f5578