UNPKG

3.24 kBMarkdownView Raw
1<p align="center">
2 <a href="https://ahooks.js.org">
3 <img width="200" src="https://ahooks.js.org/logo.svg">
4 </a>
5</p>
6
7<div align="center">
8
9A high-quality & reliable React Hooks library.
10
11[![NPM version][image-1]][1]
12[![NPM downloads][image-2]][2]
13[![npm](https://img.shields.io/npm/dw/ahooks-v2?label=downloads%28v2%29)](https://www.npmjs.com/package/ahooks-v2)
14[![npm](https://img.shields.io/github/issues/alibaba/hooks)](https://github.com/alibaba/hooks/issues)
15[![Coverage Status](https://coveralls.io/repos/github/alibaba/hooks/badge.svg?branch=master)](https://coveralls.io/github/alibaba/hooks?branch=master)
16![gzip size](https://img.badgesize.io/https:/unpkg.com/ahooks/dist/ahooks.js?label=gzip%20size&compression=gzip)
17[![Percentage of issues still open](http://isitmaintained.com/badge/open/alibaba/hooks.svg)](http://isitmaintained.com/project/alibaba/hooks 'Percentage of issues still open')
18[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/alibaba/hooks.svg)](http://isitmaintained.com/project/alibaba/hooks 'Average time to resolve an issue')
19![GitHub](https://img.shields.io/github/license/alibaba/hooks)
20
21English | [简体中文](https://github.com/alibaba/hooks/blob/master/README.zh-CN.md)
22
23</div>
24
25## 📚 Documentation
26
27- [English](https://ahooks.js.org/)
28- [中文](https://ahooks.js.org/zh-CN/)
29
30## ✨ Features
31
32- Easy to learn and use
33- Supports SSR
34- Special treatment for functions, avoid closure problems
35- Contains a large number of advanced Hooks that are refined from business scenarios
36- Contains a comprehensive collection of basic Hooks
37- Written in TypeScript with predictable static types
38
39## 📦 Install
40
41```bash
42$ npm install --save ahooks
43# or
44$ yarn add ahooks
45# or
46$ pnpm add ahooks
47```
48
49## 🔨 Usage
50
51```ts
52import { useRequest } from 'ahooks';
53```
54
55## 💻 Online Demo
56
57[![Edit demo for ahooks](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/demo-for-ahooks-forked-fg79k?file=/src/App.js)
58
59## 🤝 Contributing
60
61```bash
62$ git clone git@github.com:alibaba/hooks.git
63$ cd hooks
64$ pnpm run init
65$ pnpm start
66```
67
68Open your browser and visit http://127.0.0.1:8000
69
70We welcome all contributions, please read our [CONTRIBUTING.MD](https://github.com/alibaba/hooks/blob/master/CONTRIBUTING.MD) first, let's build a better hooks library together.
71
72Thanks to all the contributors:
73
74<a href="https://github.com/alibaba/hooks/graphs/contributors">
75 <img src="https://opencollective.com/ahooks/contributors.svg?width=960&button=false" alt="contributors" />
76</a>
77
78## 👥 Discuss
79
80<img src="https://user-images.githubusercontent.com/60802048/201606568-9ce53e3f-2e1c-4dc3-869f-fb3cf6196904.JPG" width="200" style='display:inline'/><img src="https://user-images.githubusercontent.com/60802048/201606896-31abd486-cc3e-4cc4-beea-1b244a4c5595.JPG" width="200" style='display:inline'/><img src="https://user-images.githubusercontent.com/60802048/201606953-c33f3f52-eb91-42bc-8da7-1e941e823144.JPG" width="200" style='display:inline'/>
81
82[1]: https://www.npmjs.com/package/ahooks
83[2]: https://npmjs.org/package/ahooks
84[image-1]: https://img.shields.io/npm/v/ahooks.svg?style=flat
85[image-2]: https://img.shields.io/npm/dw/ahooks.svg?style=flat