Overview of hamo hooks
mainhāmō is a collection of render-safe, tree-shakeable, and performance-oriented React hooks. The library provides specialized tools for measurement, debouncing, and DOM observation without causing layout thrash.
Core Hook Categories:
- Measurement Hooks: Track element and viewport dimensions using
useRect,useWindowSize, anduseResizeObserver. - Intersection & Scroll: Observe visibility and scroll progress with
useIntersectionObserveranduseScrollTrigger. - Debouncing: Manage timing for callbacks, effects, and state using
useDebouncedCallback,useDebouncedEffect, anduseDebouncedState. - State & Logic: Optimize updates with
useLazyState(update without re-rendering) anduseEffectEvent(stable function calling the latest callback). - Layout & Transforms: Compute scaling with
useObjectFitand manage tree-based transformations withuseTransform.