useEvent ​
Hook that creates an event and returns a stable reference of it
typescript
import { useEvent } from '@siberiacancode/reactuse';
Usage ​
typescript
const onClick = useEvent(() => console.log('clicked'));