react-use icon indicating copy to clipboard operation
react-use copied to clipboard

Rename the "useEvent" hook to "useListener" to not clash with the soon-to-be build-in hook

Open evgeniyPP opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. This RFC describes a new React hook soon to be added in the core. No doubt it will happen, considering it is really needed and it is already showed in use as a preferred method to handle non-reactive event functions in React beta docs. It would be better to rename this library's useEvent hook to not clash with the soon-to-be build-in one. But you may leave the old name as an alias for the backward-compatibility.

Describe the solution you'd like. I suggest the new name to be useListener. It's short, easy to understand, and IMO describes the functionality of the hook even more accurately. Also you may consider useEventListener.

evgeniyPP avatar Oct 27 '22 07:10 evgeniyPP