MODULE · HOOK
hamo
Hamo means hook, do the math
★ 306
Stars
↓ 4K
Per week
◇ TypeScript
Language
INSTALL
$ npm i hamoFeatures
Render-safe hooks
a small, tree-shakeable set of performance-oriented React hooks
Measurement hooks
useRect, useWindowSize, and useResizeObserver track element and viewport size without thrash
useIntersectionObserver
fire when elements enter or leave the viewport
useLazyState
update a value through a callback without triggering a re-render
Debounce hooks
useDebouncedCallback, Effect, and State debounce from one primitive
useObjectFit
compute object-fit scale from a parent's dimensions