https://github.com/darkroomengineering/hamo
Hamo means hook, do the math.
https://github.com/darkroomengineering/hamo
hooks react
Last synced: about 1 year ago
JSON representation
Hamo means hook, do the math.
- Host: GitHub
- URL: https://github.com/darkroomengineering/hamo
- Owner: darkroomengineering
- Created: 2022-02-15T19:17:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T22:45:49.000Z (about 2 years ago)
- Last Synced: 2024-05-08T23:40:16.029Z (about 2 years ago)
- Topics: hooks, react
- Language: JavaScript
- Homepage:
- Size: 40.2 MB
- Stars: 110
- Watchers: 3
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
[](https://github.com/darkroomengineering/hamo)
## Introduction
`hāmō` means hook in Latin, this package is a collection of custom performance-oriented React hooks.
## Installation
```bash
$ npm i hamo
```
## Hooks
[`useRect`](./packages/react/src/use-rect/README.md) – tracks element position within the page
[`useWindowSize`](./packages/react/src/use-window-size/README.md) – tracks window dimensions
[`useResizeObserver`](./packages/react/src/use-resize-observer/README.md) – observes element dimensions using ResizeObserver
[`useLazyState`](./packages/react/src/use-lazy-state/README.md) – runs a callback when the state changes without re-rendering the component
[`useTimeout`](./packages/react/src/use-timeout/README.md) – runs a callback after a specified delay
[`useObjectFit`](./packages/react/src/use-object-fit/README.md) – calculates the x and y scale of an object based on its parent width and height
[`useIntersectionObserver`](./packages/react/src/use-intersection-observer/README.md) – observes element intersection with the viewport
## License
MIT © [darkroom.engineering](https://github.com/darkroomengineering)
## Shoutout
Thank you to [Luca Gesmundo](https://github.com/lucagez) for having transfered us the npm package name 🙏.