{"id":16194280,"url":"https://github.com/marsidev/react-hooks","last_synced_at":"2025-08-28T22:24:00.661Z","repository":{"id":56747502,"uuid":"524253281","full_name":"marsidev/react-hooks","owner":"marsidev","description":"A collection of common React hooks. Made with TypeScript.","archived":false,"fork":false,"pushed_at":"2023-04-29T14:30:07.000Z","size":95,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T13:23:23.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@marsidev/react-hooks","language":"TypeScript","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/marsidev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-08-12T23:55:16.000Z","updated_at":"2023-03-07T05:44:16.000Z","dependencies_parsed_at":"2024-11-03T05:40:56.826Z","dependency_job_id":"5b5e0bd3-ca5b-4d4b-8d4b-fc3282d6c89f","html_url":"https://github.com/marsidev/react-hooks","commit_stats":{"total_commits":30,"total_committers":1,"mean_commits":30.0,"dds":0.0,"last_synced_commit":"d5dad0c270e8f5561faef179e8e0310f5f82f976"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/marsidev/react-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsidev%2Freact-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsidev%2Freact-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsidev%2Freact-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsidev%2Freact-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marsidev","download_url":"https://codeload.github.com/marsidev/react-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marsidev%2Freact-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265798503,"owners_count":23829951,"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":[],"created_at":"2024-10-10T08:18:38.933Z","updated_at":"2025-07-18T17:06:59.624Z","avatar_url":"https://github.com/marsidev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e@marsidev/react-hooks\u003c/p\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://www.npmjs.com/package/@marsidev/react-hooks\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@marsidev/react-hooks.svg?style=flat\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/marsidev/react-hooks/actions/workflows/ci.yaml\"\u003e\u003cimg src=\"https://github.com/marsidev/react-hooks/actions/workflows/ci.yaml/badge.svg\" alt=\"GitHub Actions status\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs Welcome\"\u003e\n  \u003ca href=\"LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/github/license/sourcerer-io/hall-of-fame.svg?colorB=ff0000\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vitest-dev/vitest\"\u003e\u003cimg src=\"https://img.shields.io/badge/tested_with-vitest-edd532.svg\" alt=\"Tested with Vitest\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://meercode.io/marsidev/react-hooks\"\u003e\u003cimg src=\"https://meercode.io/badge/marsidev/react-hooks?type=ci-score\" alt=\"CI Score\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://twitter.com/marsidev\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/marsidev.svg?style=social\" alt=\"Twitter Follow\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Introduction\n\nThis is a collection of common React Hooks that I use in my React projects.\n\nBootstraped with [antfu/starter-ts].\n\nInspired by [usehooks-ts], [@restart/hooks], and [@chakra-ui/hooks].\n\n## Installation\n- Using npm\n  ```bash\n  npm i @marsidev/react-hooks\n  ```\n\n- Using pnpm\n  ```bash\n  pnpm add @marsidev/react-hooks\n  ```\n\n- Using yarn\n  ```bash\n  yarn add @marsidev/react-hooks\n  ```\n\n## Example\n```jsx\nimport { useScrollY } from '@marsidev/react-hooks'\nimport { Header, Footer, ScrollToTop } from '~/components'\n\nexport const Layout = ({ children }) =\u003e {\n  const { offsetPassed } = useScrollY(400)\n\n  return (\n    \u003cdiv\u003e\n      \u003cHeader /\u003e\n      \u003cmain\u003e{children}\u003c/main\u003e\n      \u003cFooter /\u003e\n      {offsetPassed \u0026\u0026 \u003cScrollToTop /\u003e}\n    \u003c/div\u003e\n  )\n}\n```\n\n## Available Hooks\n- `useCopyElementToClipboard`\n- `useCopyToClipboard`\n- `useInput`\n- `useRendered`\n- `useSafeLayoutEffect`\n- `useScrollY`\n- `useWindowSize`\n\n[antfu/starter-ts]: https://github.com/antfu/starter-ts\n[usehooks-ts]: https://usehooks-ts.com\n[@restart/hooks]: https://www.npmjs.com/package/@restart/hooks\n[@chakra-ui/hooks]: https://github.com/chakra-ui/chakra-ui/tree/main/packages/hooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarsidev%2Freact-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarsidev%2Freact-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarsidev%2Freact-hooks/lists"}