Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upreact/sort-comp event handlers #2116
Open
Labels
Comments
|
This is something you could configure for yourself, so your question is about changing the default? |
|
I think it's common enough of a practice (React docs) to make the default, but that's my opinion, and I'm curious if others concur. |
|
The React docs recommend a number of antipatterns that this guide does not :-) but in this case it doesn't seem problematic to allow. |
|
Awesome! I might have time to get that implemented... (and I agree on the other react doc recommendations, good to handle those instances on a case-by-case basis) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This might have been gone over before, but a common practice for event handlers (currently documented as
/^on.+$/) is to start them withhandle..., as inhandleClick(). 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
onas the method name of a handler, is there any opposition to add (/^handle.+$/) before the (/^on.+$/) entry for thereact/sort-comprule?