useEventCallback

Custom hook that creates a memoized event callback.

Usage

import { useEventCallback } from "@tealess/hooks";
export default function Component() {
const handleClick = useEventCallback((event) => {
// Handle the event here
console.log("Clicked", event);
});
return <button onClick={handleClick}>Click me</button>;
}