Returns a stable function identity that is a no-op during the initial render and after the component is unmounted.
The handler argument types.
The handler return value.
A callback that is invoked by the returned handler.
A stable function identity.
function MyComponent(props) { // Handler identity never changes const handleClick = useHandler(props.onClick);} Copy
function MyComponent(props) { // Handler identity never changes const handleClick = useHandler(props.onClick);}
Returns a stable function identity that is a no-op during the initial render and after the component is unmounted.