{"id":21229782,"url":"https://github.com/pansyjs/react-hooks","last_synced_at":"2025-07-10T15:32:25.611Z","repository":{"id":39652075,"uuid":"372790344","full_name":"pansyjs/react-hooks","owner":"pansyjs","description":"react hooks","archived":false,"fork":false,"pushed_at":"2024-04-15T09:26:36.000Z","size":41875,"stargazers_count":9,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-16T05:19:15.638Z","etag":null,"topics":["hooks","mqtt","react","react-hooks","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://hooks.xingkang.wang","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/pansyjs.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}},"created_at":"2021-06-01T10:29:40.000Z","updated_at":"2024-04-21T14:35:51.136Z","dependencies_parsed_at":"2023-02-17T19:15:33.638Z","dependency_job_id":"a900be6c-a64b-4f95-89ac-f94084f19e4d","html_url":"https://github.com/pansyjs/react-hooks","commit_stats":null,"previous_names":[],"tags_count":538,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansyjs%2Freact-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansyjs%2Freact-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansyjs%2Freact-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pansyjs%2Freact-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pansyjs","download_url":"https://codeload.github.com/pansyjs/react-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225646629,"owners_count":17501904,"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":["hooks","mqtt","react","react-hooks","typescript","websocket"],"created_at":"2024-11-20T23:29:33.493Z","updated_at":"2024-11-20T23:29:34.017Z","avatar_url":"https://github.com/pansyjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://react-hooks-chi.vercel.app\"\u003e\n    \u003cimg width=\"150\" src=\"https://cdn.jsdelivr.net/gh/wangxingkang/pictures@latest/imgs/20210623172110.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003ch1 align=\"center\"\u003e@pansy/react-hooks\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![NPM version][image-1]][npm-url]\n[![NPM downloads][image-2]][npm-url]\n[![codecov][codecov-1]][codecov-2]\n[![license][license-1]][npm-url]\n[![issues](https://img.shields.io/github/issues/pansyjs/react-hooks)](https://github.com/pansyjs/react-hooks/issues)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/pansyjs/react-hooks.svg)](http://isitmaintained.com/project/pansyjs/react-hooks 'Percentage of issues still open')\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/pansyjs/react-hooks.svg)](http://isitmaintained.com/project/pansyjs/react-hooks 'Average time to resolve an issue')\n\n\u003c/div\u003e\n\n## 📚 文档\n\n[docs](https://react-hooks-chi.vercel.app/)\n\n## ✨ 特性\n\n- 📦 每个 Hook 单独发包，方便使用\n- 🌵 包含丰富的基础 Hooks\n- 💻 使用 TypeScript 编写，提供完善的类型定义\n\n## 🏗 安装\n\n```\n// npm\nnpm install @pansy/react-hooks --save\n\n// yarn\nyarn add @pansy/react-hooks\n\n// pnpm\npnpm install @pansy/react-hooks\n```\n\n**注意** 每个 Hook 单独发包，如只是用部分可单独安装对应的 Hook 包;\n\n🔨 使用\n\n```ts\nimport { useModal } from '@pansy/react-hooks';\n\n// or\nimport { useModal } from '@pansy/use-modal';\n```\n\n## 🤝 参与共建\n\n本仓库使用 [pnpm](https://pnpm.io/zh) 进行依赖管理，开发前请保证已安装\n\n```sh\n$ git clone git@github.com:pansyjs/react-hooks.git\n$ cd react-hooks\n$ pnpm install\n$ pnpm start\n```\n\n如何创建一个Hook, 执行以下命令，会帮你创建基本的文件\n\n```sh\npnpm run hooks:create\n```\n\n[image-1]: https://img.shields.io/npm/v/@pansy/react-hooks.svg?style=flat\n[image-2]: https://img.shields.io/npm/dw/@pansy/react-hooks.svg?style=flat\n[codecov-1]: https://codecov.io/github/pansyjs/react-hooks/branch/master/graph/badge.svg?token=EKYDUW28H0\n[codecov-2]: https://codecov.io/github/pansyjs/react-hooks\n[license-1]: https://badgen.net/npm/license/@pansy/react-hooks\n[npm-url]: https://www.npmjs.com/package/@pansy/react-hooks\n[issues-1]: https://www.npmjs.com/package/@pansy/react-hooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansyjs%2Freact-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpansyjs%2Freact-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansyjs%2Freact-hooks/lists"}