Skip to content

Accidental bypass for react/jsx-no-bind allowArrowFunctions #1395

Closed
@trevtrich

Description

We've recently started to get rid of our usage of arrow functions in component props for similar reasons to that mentioned here. We went ahead and set:

'react/jsx-no-bind': ['error', {
      allowArrowFunctions: false,
      allowBind: false,
}]

but realized we were still able to get away with using something like:

const someFunc = () => onClickHandler(userId)
<SomeComponent onClick={someFunc} />

So we didn't fix the problem, we just accidentally tricked it. Is this expected behavior or is this a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions