hooks README

The project's README from github.com/alibaba/hooks. As one markdown file: README.md.

A high-quality & reliable React Hooks library.

NPM version NPM downloads npm npm Coverage Status gzip size Percentage of issues still open Average time to resolve an issue GitHub

English | 简体中文

📚 Documentation

Notice

use-url-state is now published as @ahooks.js/use-url-state.

If you are installing or upgrading this package, please use the new package name.

✨ Features

📦 Install

$ npm install --save ahooks
# or
$ yarn add ahooks
# or
$ pnpm add ahooks
# or
$ bun add ahooks

🔨 Usage

import { useRequest } from "ahooks";

💻 Online Demo

Edit demo for ahooks

🤝 Contributing

$ git clone [email protected]:alibaba/hooks.git
$ cd hooks
$ pnpm run init
$ pnpm start

Open your browser and visit http://127.0.0.1:8000

We welcome all contributions, please read our CONTRIBUTING.MD first, let's build a better hooks library together.

Thanks to all the contributors:

contributors

👥 Discuss

ahooks discussion group 1 ahooks discussion group 2 ahooks discussion group 3

hooks (alibaba/hooks)

Searching Database…

15K ·GitHub
What is this?This is ahooks, a high-quality and reliable React Hooks library from Alibaba, bundling a large set of ready-made hooks for everyday React development.
Is this a framework I build an app on, or a library I add to an existing project?A library, not a framework: you install it as an npm package into an existing React app and import only the hooks you need.
How do I add it to my project?Install the ahooks package from npm (npm install ahooks) and import hooks in your components. Full docs and an online demo live at alibaba.github.io/hooks.
Anything to watch out for when installing or upgrading?One naming gotcha: use-url-state has been split out of the main package and is now published as @ahooks.js/use-url-state, so use that name when installing or upgrading it.
What is ahooks, exactly?It is the npm name of this library — install it as ahooks. Pieces split out of the main package publish under the @ahooks.js scope, like @ahooks.js/use-url-state.
Do the hooks behave correctly in React StrictMode?The repo's test suite runs all packages in React strict mode (REACT_MODE=strict), so strict-mode behavior is part of regular test coverage.
Can I try the hooks without installing anything?Yes — the README links an online demo, and the documentation site at alibaba.github.io/hooks lets you browse hooks and usage before committing.
Why did the authors build this instead of using existing hook collections?Its advanced hooks were refined from the team's own business scenarios, and the project grew out of the umi ecosystem, where it was originally known as umi-hooks.
Creator
alibaba
Size
12.9 MB
Stars
15K
Age
7y
Commits · 90 Days