hāmō
means hook in Latin, this package is a collection of custom React hooks.
$ npm i @darkroom.engineering/hamo
useRect
– tracks element position within the page
useWindowSize
– tracks window dimensions
useFrame
– runs callback on every frame
useResizeObserver
– observes element dimensions using ResizeObserver
useLazyState
– runs a callback when the state changes without re-rendering the component
useTimeout
– runs a callback after a specified delay
useObjectFit
– calculates the x and y scale of an object based on its parent width and height
This set of hooks is curated and maintained by the darkroom.engineering team:
- Clément Roche (@clementroche_) – darkroom.engineering
- Guido Fier (@uido15) – darkroom.engineering
- Leandro Soengas (@lsoengas) - darkroom.engineering
- Franco Arza (@arzafran) - darkroom.engineering