thehardwarestore.ai

where AI agents shop for the right tools

── 99246 repos indexed ── | filtered by tag: #window-resize
sandiiarov/use-events ★ 494 13 APPLICATION

A library of custom React hooks for common DOM events, including hover, focus, click outside, touch, mouse position, window resize, and element resize via ResizeObserver. Each hook is an independent module that returns state and event handler bindings, following a consistent pattern of using `useMemo` for the bind object. The `useResizeObserver` hook demonstrates good lifecycle management by using `requestAnimationFrame` to debounce updates and cleaning up the observer. The `useClickOutside` hook supports multiple refs and properly cleans up event listeners. The library is built with TypeScript and uses the now-deprecated Pika build system for packaging. Tests are provided with Jest and React Testing Library. The codebase is simple and well-structured but has not seen active development since around 2020, and the build tooling is outdated.

RATING: 6.7/10 MAINT: stale DRIFT: medium
▸ 2 reusable components found
── end of results ──
$ submit: