Content-Length: 277480 | pFad | https://redirect.github.com/jsx-eslint/eslint-plugin-react/issues/1395

F8 Accidental bypass for react/jsx-no-bind allowArrowFunctions · Issue #1395 · jsx-eslint/eslint-plugin-react · GitHub
Skip to content

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

@trevtrich

Description

@trevtrich

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?

Metadata

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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://redirect.github.com/jsx-eslint/eslint-plugin-react/issues/1395

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy