{"id":13403013,"url":"https://github.com/antonioru/beautiful-react-hooks","last_synced_at":"2025-05-13T15:02:29.407Z","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":"2025-03-12T20:55:40.000Z","size":6269,"stargazers_count":8306,"open_issues_count":11,"forks_count":584,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-05-05T22:15:46.002Z","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,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-18T19:50:43.000Z","updated_at":"2025-05-05T21:34:32.000Z","dependencies_parsed_at":"2024-01-07T18:07:54.371Z","dependency_job_id":"db9f6d65-a605-469d-a631-277817d44db7","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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253968080,"owners_count":21992252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-05-13T15:02:29.381Z","avatar_url":"https://github.com/antonioru.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Utilities","React Libraries","前端开发框架及项目","🌐 Web Development - Frontend"],"sub_categories":["Hooks Collection","其他_文本生成、文本对话"],"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"}