Skip to content

react/sort-comp event handlers #2116

@jeffvandyke

Description

@jeffvandyke

This might have been gone over before, but a common practice for event handlers (currently documented as /^on.+$/) is to start them with handle..., as in handleClick(). This is seen all over the React docs, including the home page, and it allows a clear convention for names of props (/^on.+$/) vs handlers defined on that instance (/^handle.+$/).

Since some people might allow usage of on as the method name of a handler, is there any opposition to add (/^handle.+$/) before the (/^on.+$/) entry for the react/sort-comp rule?

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