百科.dev
全部条目趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-use

> 编程语言
开源

反应钩-

44.0K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

反应钩-

  • 传感器 - 使用Battery & mdash; 轨迹设备电池状态. [!][img-demo] (https://codesandbox.io/s/qlvn662zww) - 使用Geoslocation & mdash; 轨迹用户设备的地理位置状态. [!][img-demo] (https://streamich.ZZZJM0ZZ.io/react-use/?path=/sensors-usegeoloc-demo) - 使用Hover并使用Hover=/story/sersors-use/?path=/story/sors-sh-mdle的轨迹用户是否在使用; - 使用Intersection & mdash; 跟踪 HTML 元素的相交点 。 [!][ [img-demo]] (https://streamich.ZGitHub.io/ react-use/?path=/story/sensors-use intersection--demo) - 使用Key,使用KeyPress,使用KeyboardJs,并使用KeyPressEvent & mdash; 跟踪键. [!][img-demo] (https://streamich.ZZZM3Z.io/react-use/.)

核心特点

  • •useBattery &mdash; tracks device battery state. [![][img-demo]](https://codesandbox.io/s/qlvn662zww)
  • •useGeolocation &mdash; tracks geo location state of user's device. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/sensors-usegeolocation--demo)
  • •useHover and useHoverDirty &mdash; tracks mouse hover state of some element. [![][img-demo]](https://codesandbox.io/s/zpn583rvx)
  • •useHash &mdash; tracks location hash value. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/sensors-usehash--demo)
  • •useIdle &mdash; tracks whether user is being inactive.
  • •useIntersection &mdash; tracks an HTML element's intersection. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/sensors-useintersection--demo)
  • •useKey, useKeyPress, useKeyboardJs, and useKeyPressEvent &mdash; track keys. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/sensors-usekeypressevent--demo)
  • •useLocation and useSearchParam &mdash; tracks page navigation bar location state.
  • •useLongPress &mdash; tracks long press gesture of some element.
  • •useMedia &mdash; tracks state of a CSS media query. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/sensors-usemedia--demo)

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言