Replies: 1 comment 1 reply
-
I've opened #4637 for this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was hoping for a rule to mark arrow functions passed as JSX props as errors or warnings. This idea is based on the Q&A discussion #4625.
In ESLint there this rule is called jsx-no-bind but the implementation I'm suggesting is just to complain about arrow functions used as props:
Wrong:
Valid:
So there would be no tracking of the prop origin, just the syntax.
Reason for this is that using arrow functions in JSX makes the code a bit messy and probably less reusable than just passing valid callbacks, functions, methods, etc.
Sample image of the VS Code:
Beta Was this translation helpful? Give feedback.
All reactions