{"id":13403013,"url":"https://github.com/antonioru/beautiful-react-hooks","last_synced_at":"2026-10-18T22:28:29.925Z","repository":{"id":37441201,"uuid":"228911039","full_name":"antonioru/beautiful-react-hooks","owner":"antonioru","description":"🔥 A collection of beautiful and (hopefully) useful React hooks to speed-up your components and hooks development 🔥","archived":false,"fork":false,"pushed_at":"2026-02-06T12:18:47.000Z","size":6296,"stargazers_count":8347,"open_issues_count":11,"forks_count":579,"subscribers_count":69,"default_branch":"master","last_synced_at":"2026-10-12T02:39:35.488Z","etag":null,"topics":["custom-hooks","front-end","hooks","react","react-components","react-hooks"],"latest_commit_sha":null,"homepage":"https://antonioru.github.io/beautiful-react-hooks/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonioru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"accessibility":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2019-12-18T19:50:43.000Z","updated_at":"2026-10-09T17:17:30.000Z","dependencies_parsed_at":"2026-10-12T02:44:24.507Z","dependency_job_id":null,"html_url":"https://github.com/antonioru/beautiful-react-hooks","commit_stats":{"total_commits":412,"total_committers":67,"mean_commits":6.149253731343284,"dds":0.7427184466019418,"last_synced_commit":"420a676c03aa52367314f88c5a17bbc9f65b4d33"},"previous_names":["beautifulinteractions/beautiful-react-hooks"],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/antonioru/beautiful-react-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioru%2Fbeautiful-react-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioru%2Fbeautiful-react-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioru%2Fbeautiful-react-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioru%2Fbeautiful-react-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonioru","download_url":"https://codeload.github.com/antonioru/beautiful-react-hooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioru%2Fbeautiful-react-hooks/sbom","scorecard":{"id":199636,"data":{"date":"2025-08-11","repo":{"name":"github.com/antonioru/beautiful-react-hooks","commit":"ee987048b0c138d51bff59f92bc9d5f1bafddbfb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/branch-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":4,"reason":"Found 6/13 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branch-tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/branch-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/branch-tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/branch-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/antonioru/beautiful-react-hooks/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/branch-tests.yml:23","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:25","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:13"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T22:35:38.014Z","repository_id":37441201,"created_at":"2025-08-16T22:35:38.014Z","updated_at":"2025-08-16T22:35:38.014Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":343843146,"owners_count":38214137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-12T02:00:06.297Z","response_time":96,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-hooks","front-end","hooks","react","react-components","react-hooks"],"created_at":"2024-07-30T19:01:24.226Z","updated_at":"2026-10-18T22:28:29.217Z","avatar_url":"https://github.com/antonioru.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Utilities","React Libraries","🌐 Web Development - Frontend","Other"],"sub_categories":["Hooks Collection","Mathematics"],"readme":"![CI/CD](https://github.com/beautifulinteractions/beautiful-react-hooks/workflows/CI/CD/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/beautifulinteractions/beautiful-react-hooks/badge.svg?branch=master)](https://coveralls.io/github/beautifulinteractions/beautiful-react-hooks?branch=master)[![License:\nMIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![npm](https://img.shields.io/npm/v/beautiful-react-hooks)\n![GitHub stars](https://img.shields.io/github/stars/beautifulinteractions/beautiful-react-hooks?style=social)\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"./logo.png\" alt=\"Beautiful React Hooks\" width=\"750px\" /\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv\u003e\n  \u003cp align=\"center\"\u003e\n    A collection of tailor-made React hooks to enhance your development process and make it faster.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://antonioru.github.io/beautiful-react-hooks/\" target=\"_blank\"\u003e\n    🌟 Hooks Playground 🌟\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n![Usage example](./usage_example.png)\n\n🇬🇧 English | \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.zh-CN.md\"\u003e🇨🇳 简体中文\u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.it-IT.md\"\u003e🇮🇹 Italiano\u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.es-ES.md\"\u003e 🇪🇸 Español \u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.uk-UA.md\"\u003e🇺🇦 Ukrainian\u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.pt-BR.md\"\u003e🇧🇷 Brazilian Portuguese\u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.pl-PL.md\"\u003e🇵🇱 Polski \u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.jp-JP.md\"\u003e🇯🇵 日本語 \u003c/a\u003e\n| \u003ca href=\"https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.tr-TR.md\"\u003e🇹🇷 Türkçe\u003c/a\u003e\n\n## 💡 Why?\n\nCustom React hooks allow developers to abstract the business logic of components into single, reusable functions.\\\nI have noticed that many of the hooks I have created and shared across projects involve callbacks, references, events, and dealing with the\ncomponent lifecycle.\\\nTherefore, I have created `beautiful-react-hooks`, a collection of useful [React hooks](https://beta.reactjs.org/reference/react) that may\nhelp other developers speed up their development process.\\\nMoreover, I have strived to create a concise and practical API that emphasizes code readability, while keeping the learning curve as low as\npossible, making it suitable for larger teams to use and share\nt\n**-- Please before using any hook, read its documentation! --**\n\n## ☕️ Features\n\n* Concise API\n* Small and lightweight\n* Easy to learn\n\n\u003cdiv\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://antonioru.github.io/beautiful-react-hooks/\" target=\"_blank\"\u003e\n    🌟 Hooks Playground 🌟\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## 🕺 Install\n\nby using `npm`:\n\n```bash\n$ npm install beautiful-react-hooks\n```\n\nby using `yarn`:\n\n```bash\n$ yarn add beautiful-react-hooks\n```\n\n## Basic usage\n\nimporting a hooks is as easy as the following straightforward line:\n\n```ts static\nimport useSomeHook from 'beautiful-react-hooks/useSomeHook'\n```\n\n## 🎨 Hooks\n\n* [useMutableState](docs/useMutableState.md)\n* [useInfiniteScroll](docs/useInfiniteScroll.md)\n* [useObservable](docs/useObservable.md)\n* [useEvent](docs/useEvent.md)\n* [useGlobalEvent](docs/useGlobalEvent.md)\n* [usePreviousValue](docs/usePreviousValue.md)\n* [useValueHistory](docs/useValueHistory.md)\n* [useValidatedState](docs/useValidatedState.md)\n* [useMediaQuery](docs/useMediaQuery.md)\n* [useOnlineState](docs/useOnlineState.md)\n* [useViewportSpy](docs/useViewportSpy.md)\n* [useViewportState](docs/useViewportState.md)\n* [useSpeechRecognition](docs/useSpeechRecognition.md) and [useSpeechSynthesis](docs/useSpeechSynthesis.md)\n* [useGeolocation](docs/useGeolocation.md), [useGeolocationState](docs/useGeolocationState.md)\n  and [useGeolocationEvents](docs/useGeolocationEvents.md)\n* [useDrag](docs/useDrag.md), [useDropZone](docs/useDropZone.md) and [useDragEvents](docs/useDragEvents.md)\n* [useMouse](docs/useMouse.md), [useMouseState](docs/useMouseState.md) and [useMouseEvents](docs/useMouseEvents.md)\n* [useTouch](docs/useTouch.md), [useTouchState](docs/useTouchState.md) and [useTouchEvents](docs/useTouchEvents.md)\n* [useLifecycle](docs/useLifecycle.md), [useDidMount](docs/useDidMount.md) and [useWillUnmount](docs/useWillUnmount.md)\n* [useWindowResize](docs/useWindowResize.md)\n* [useWindowScroll](docs/useWindowScroll.md)\n* [useRequestAnimationFrame](docs/useRequestAnimationFrame.md)\n* [useResizeObserver](docs/useResizeObserver.md)\n* [useTimeout](docs/useTimeout.md)\n* [useInterval](docs/useInterval.md)\n* [useDebouncedCallback](docs/useDebouncedCallback.md)\n* [useThrottledCallback](docs/useThrottledCallback.md)\n* [useLocalStorage](docs/useLocalStorage.md)\n* [useSessionStorage](docs/useSessionStorage.md)\n* [useDefaultedState](docs/useDefaultedState.md)\n* [useRenderInfo](docs/useRenderInfo.md)\n* [useSwipe](docs/useSwipe.md), [useHorizontalSwipe](docs/useHorizontalSwipe.md) and [useVerticalSwipe](docs/useVerticalSwipe.md)\n* [useSwipeEvents](docs/useSwipeEvents.md)\n* [useConditionalTimeout](docs/useConditionalTimeout.md)\n* [useCookie](docs/useCookie.md)\n* [useDarkMode](docs/useDarkMode.md)\n* [useUnmount](docs/useUnmount.md)\n* [useUpdateEffect](docs/useUpdateEffect.md)\n* [useIsFirstRender](docs/useIsFirstRender.md)\n* [useMutationObserver](docs/useMutationObserver.md)\n* [useAudio](docs/useAudio.md)\n* [useObjectState](docs/useObjectState.md)\n* [useToggle](docs/useToggle.md)\n* [useQueryParam](docs/useQueryParam.md)\n* [useQueryParams](docs/useQueryParams.md)\n* [useSearchQuery](docs/useSearchQuery.md)\n* [useURLSearchParams](docs/useURLSearchParams.md)\n\n\u003cdiv\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://antonioru.github.io/beautiful-react-hooks/\" target=\"_blank\"\u003e\n    🌟 Hooks Playground 🌟\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Peer dependencies\n\nSome hooks are built using third-party libraries (such as rxjs, react-router-dom, redux). As a result, you will see these libraries listed\nas peer dependencies.\\\nUnless you are using these hooks directly, you need not install these dependencies.\n\n## Contributing\n\nContributions are very welcome and wanted.\n\nTo submit your custom hook, make sure you have thoroughly read and understood the [CONTRIBUTING](./CONTRIBUTING.md) guidelines.\n\n**Prior to submitting your pull request**: please take note of the following\n\n1. make sure to write tests for your code, run `npm test` and `npm build` before submitting your merge request.\n2. in case you're creating a custom hook, make sure you've added the documentation (*you may use\n   the [HOOK_DOCUMENTATION_TEMPLATE](./HOOK_DOCUMENTATION_TEMPLATE.md) to document your custom hook*).\n\n## Credits\n\nIcon made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](https://www.flaticon.com/free-icon/hook_1081812)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioru%2Fbeautiful-react-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonioru%2Fbeautiful-react-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioru%2Fbeautiful-react-hooks/lists"}