Size
0.19 kb
useEventHandler
Stabilize a function's reference across renders. The function is always up to date in effects and DOM events.
Installation
Usage
Provide a function to useEventHandler
:
onData
now has a stable identity, making it safe to use in useEffect
.