{"_id":"b-hooks-core","name":"b-hooks-core","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"b-hooks-core","private":false,"version":"0.0.1","type":"module","scripts":{"dev":"vite","build":"tsc -b && vite build","lint":"eslint .","preview":"vite preview"},"dependencies":{"ahooks":"^3.7.10","react":"^19.0.0","react-dom":"^19.0.0"},"devDependencies":{"@eslint/js":"^9.15.0","@types/node":"^20.11.6","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4","eslint":"^9.15.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.14","globals":"^15.12.0","typescript":"~5.6.2","typescript-eslint":"^8.15.0","vite":"^6.0.1","vite-plugin-dts":"^4.3.0","vite-plugin-lib-inject-css":"^2.1.1"},"_id":"b-hooks-core@0.0.1","gitHead":"2aa6d96650a86f7861813b263399de454af40cb8","description":"基于React 19 的 Hooks 集合","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-cbu1MJQak2AUNG/iSidxLfd4DFU9VSHKkmUmQ88Fr/mpqSFGxA8q9PcWLYGyc6gVw+RirXr8m8kAsCG7p25ljQ==","shasum":"4a125f18558ec2de1343f6a35b478e17054efb84","tarball":"https://registry.npmjs.org/b-hooks-core/-/b-hooks-core-0.0.1.tgz","fileCount":12,"unpackedSize":9608,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICneQ2Ugj5+NhV9cKKzBhQwCAINBgOvss2Ji2mdE2N9UAiA75pz7f8dwHdNwgfEJpss786N5zHNaoWfdPNEj5lnhjQ=="}]},"_npmUser":{"name":"shi.yuan","email":"shiy724@qq.com"},"directories":{},"maintainers":[{"name":"shi.yuan","email":"shiy724@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/b-hooks-core_0.0.1_1733754581772_0.9351573879412365"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-09T14:29:41.771Z","0.0.1":"2024-12-09T14:29:41.922Z","modified":"2024-12-09T14:29:42.185Z"},"maintainers":[{"name":"shi.yuan","email":"shiy724@qq.com"}],"description":"基于React 19 的 Hooks 集合","readme":"# RHooks\n基于React 19 的 Hooks 集合\n\n## 安装\n```\nnpm install rhooks\n```\n\n## Hooks列表\n\n### useRequest：\n#### 使用\n```\nimport { useRequest } from 'rhooks'\n```\n``` ts\nconst { data, loading, run } = useRequest(() => {\n  return new Promise((resolve) => {\n    setTimeout(() => {\n      resolve('hello world')\n    }, 1000)\n  })\n}, {\n  manual: true,\n  ready: true,\n  onSuccess: (data) => {\n    console.log(data)\n  },\n  onFailure: (error) => {\n    console.log(error)\n  }\n})\n```\n\n### useVirtual:\n#### 使用\n```\nimport { useVirtual } from 'rhooks'\n```\n``` ts\nconst { state, wrapperRef, scrollRef } = useVirtual({\n  itemHeight: 50,\n  dataSource: Array(1000).fill(0)\n})\n```","readmeFilename":"README.md"}