The Unlicense

项目介绍

childrentime/reactuse 是一个托管在 GitHub 上的开源项目,主要使用 MDX 编写,采用 The Unlicense 许可证,目前获得 1.1k 个 Star、144 次 Fork。

仓库全名
childrentime/reactuse
开源许可证
The Unlicense
Star 数
1.1k
Fork 数
144
未关闭 Issue
5

README 摘要

Sponsors Sponsoring ReactUse puts your product in front of the React developers who install @reactuses/core every month — your logo right here at the top of the README, and on reactuse.com/sponsor. Live reach: 💎  Special Sponsors Cenno Expense tracking for iPhone & iPad — no account, no server, no ads. Free on the App Store. Unscript English speaking practice for iPhone — say one real dialogue four times,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

reactuse 用什么语言开发?

主要使用 MDX 编写,采用 The Unlicense 许可证,目前有 1.1k 个 Star。

reactuse 可以免费商用吗?

仓库采用 The Unlicense 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 reactuse 的源码?

可以直接克隆仓库:git clone https://github.com/childrentime/reactuse.git,默认分支为 main;安装与运行步骤见仓库 README。

reactuse 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 5 个未关闭 Issue;Star 数为 1.1k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

115+ production-ready React Hooks for sensors, UI, state & browser APIs. Tree-shakable, SSR-safe, TypeScript-first. Used by Shopee, PDD & Ctrip. Inspired by VueUse.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Astro
CSS
HTML
JavaScript
MDX
Python
Shell
TypeScript

Release

README

MCP Toplist

ReactUse - Collection of essential React Hooks ReactUse - Collection of essential React Hooks

NPM Version NPM Downloads UnLicense Tree Shaking Friendly TypeScript Support Sponsor ReactUse

Context7 indexed Ask DeepWiki GitMCP ReactUse MCP server on Glama

Sponsors

Sponsoring ReactUse puts your product in front of the React developers who install @reactuses/core every month — your logo right here at the top of the README, and on reactuse.com/sponsor. Live reach:

npm installs per month GitHub stars

💎  Special Sponsors

Cenno — expense tracking for iPhone and iPad
Cenno
Expense tracking for iPhone & iPad — no account, no server, no ads. Free on the App Store.
Unscript — English speaking practice for iPhone
Unscript
English speaking practice for iPhone — say one real dialogue four times, with less of the script each time. Speech stays on your phone. Free on the App Store.
FogAway — fog-of-war exploration map for iPhone
FogAway
Uncover the places you explore, record your routes, and revisit each day. Tracks stay on your phone. Available on the App Store.

Sponsor on GitHub Buy me a coffee

🥇 Gold, 🥈 Silver and 🥉 Bronze slots are open — claim one and your logo goes live here within 48 hours. Tiers, benefits and company invoicing: reactuse.com/sponsor.

Introduction

ReactUse is a comprehensive collection of 100+ essential React Hooks for building modern React applications. Inspired by VueUse, it provides production-ready hooks for browser APIs, state management, sensors, animations, DOM elements, and more.

Features

  • 🎯 100+ Hooks — The most comprehensive React hooks collection
  • 📦 Tree-Shakable — Import only what you need
  • 🔷 TypeScript — Full type definitions for every hook
  • 🖥️ SSR Compatible — Works with Next.js, Remix, and more
  • 📚 Well Documented — Interactive demos for every hook
  • 🤖 MCP Support — AI-powered hook discovery

Installation

npm i @reactuses/core

Quick Start

import { useToggle } from "@reactuses/core";

const Demo = () => {
  const [on, toggle] = useToggle(true);
  return <button ? "ON" : "OFF"}</button>;
};

Hook Categories

Browser (50 hooks)

useClipboard, useColorMode, useCookie, useDarkMode, useDocumentVisibility, useEyeDropper, useFavicon, useFileDialog, useFullscreen, useMediaDevices, useMediaQuery, useOnline, usePermission, usePlatform, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, useScreenSafeArea, useScriptTag, useTextDirection, useTitle, useWebNotification, useBroadcastChannel, useEventSource, useFetchEventSource, useGeolocation, useIdle, useKeyModifier, useMobileLandscape, useNetwork, useOrientation, usePageLeave, useSpeechRecognition, useWindowFocus, useWindowScroll, useWindowSize, and more…

State (24 hooks)

useBoolean, useControlled, useCounter, useCycleList, useDebounce, useDebounceFn, useDisclosure, useLocalStorage, useMap, usePrevious, useSessionStorage, useSetState, useThrottle, useThrottleFn, useToggle, and more…

Element (19 hooks)

useClickOutside, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementSize, useElementVisibility, useFocus, useHover, useInfiniteScroll, useIntersectionObserver, useLongPress, useMeasure, useMouse, useMousePressed, useMutationObserver, useResizeObserver, useScroll, useScrollIntoView, and more…

Effect (20 hooks)

useAsyncEffect, useCustomCompareEffect, useDeepCompareEffect, useEventListener, useInterval, useMount, useRafFn, useTimeout, useTimeoutFn, useUnmount, useUpdate, and more…

Integrations (1 hook)

useQRCode


MCP Support

If you want to use the MCP (Model Context Protocol) integration with reactuse, you can easily set it up with the following configuration. This allows you to run the @reactuses/mcp utility via npx for enhanced command-line support and automation.

Add the following to your configuration:

"@reactuses/mcp": {
  "command": "npx",
  "args": ["-y", "@reactuses/mcp@latest"],
  "type": "stdio"
}

Documentation

📖 Full Documentation | 📖 LLM-friendly Documentation | 💬 Discord | 🐛 Issues


Contribute

See the Contributing Guide

ChangeLog

See the ChangeLog


Thanks

This project is heavily inspired by the following awesome projects.


Support ReactUse

ReactUse is free, released into the public domain under the Unlicense, and maintained in spare time. If it saved you a day of work, consider becoming a sponsor (from $5/month) or buying me a coffee — it keeps the hooks maintained and the docs interactive. 🥰

评论

暂无评论