zenghongtu / React Use Chinese
Licence: unlicense
中文文档@react-use
Stars: ✭ 643
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to React Use Chinese
Cljdoc
📚 A central documentation hub for the Clojure community
Stars: ✭ 416 (-35.3%)
Mutual labels: docs
V8 Archive
Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
Stars: ✭ 486 (-24.42%)
Mutual labels: docs
Bluedoc
An open-source document management tool for enterprise self host.
Stars: ✭ 579 (-9.95%)
Mutual labels: docs
Docz
✍ It has never been so easy to document your things!
Stars: ✭ 22,020 (+3324.57%)
Mutual labels: docs
Project Explorer
🎋A CLI tool to create an annotated tree visualization of any project
Stars: ✭ 485 (-24.57%)
Mutual labels: docs
Competitive Programming Docs
🌺Algorithm papers, coursewares, documents, notes and other materials are constantly being updated.
Stars: ✭ 572 (-11.04%)
Mutual labels: docs
Verb
HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
Stars: ✭ 442 (-31.26%)
Mutual labels: docs
Docs
Documentation, API reference, and code snippets for NativeScript
Stars: ✭ 442 (-31.26%)
Mutual labels: docs
Mapbox Unity Sdk
Mapbox Unity SDK - https://www.mapbox.com/unity/
Stars: ✭ 545 (-15.24%)
Mutual labels: docs
The Documentation Compendium
📢 Various README templates & tips on writing high-quality documentation that people want to read.
Stars: ✭ 4,306 (+569.67%)
Mutual labels: docs
Pdoc
🐍 ➡️ 📜 Auto-generate API documentation for Python projects
Stars: ✭ 604 (-6.07%)
Mutual labels: docs
Mdx Docs
📝 Document and develop React components with MDX and Next.js
Stars: ✭ 412 (-35.93%)
Mutual labels: docs
About Swiftui
Gathering all info published, both by Apple and by others, about new framework SwiftUI.
Stars: ✭ 5,954 (+825.97%)
Mutual labels: docs
Django Rest Framework Docs
Document Web APIs made with Django Rest Framework
Stars: ✭ 607 (-5.6%)
Mutual labels: docs
Markdown Magic
💫 Automatically format markdown files, sync external docs/src code & make better docs
Stars: ✭ 551 (-14.31%)
Mutual labels: docs
-
传感器
-
useBattery
— 跟踪设备电池状态。 -
useGeolocation
— 跟踪用户设备的地理位置状态。 -
useHover
anduseHoverDirty
— 跟踪鼠标悬停某个元素的状态。 -
useIdle
— 跟踪用户是否处于非活动状态。 -
useKey
,useKeyPress
,useKeyboardJs
, 和useKeyPressEvent
— 追踪按键。 -
useLocation
— 跟踪页面导航栏的位置状态。 -
useMedia
— 跟踪CSS媒体查询的状态。 -
useMediaDevices
— 跟踪连接的硬件设备的状态。 -
useMotion
— 跟踪设备的运动传感器的状态。 -
useMouse
anduseMouseHovered
— 跟踪鼠标位置的状态。 -
useNetwork
— 跟踪用户的互联网连接状态。 -
useOrientation
— 跟踪设备屏幕方向的状态。 -
usePageLeave
— 当鼠标离开页面边界时触发。 -
useScroll
— 跟踪HTML元素的滚动位置。 -
useSize
— 跟踪HTML元素的维度。 -
useStartTyping
— 检测用户何时开始输入。 -
useWindowScroll
— 跟踪窗口
滚动位置。 -
useWindowSize
— 跟踪窗口
尺寸。
-
-
用户界面
-
useAudio
— 播放音频并公开其控件。 -
useClickAway
— 当用户点击目标区域外时触发回调。 -
useCss
— 动态调整CSS。 -
useDrop
anduseDropArea
— 跟踪文件,链接和复制粘贴。 -
useFullscreen
— 全屏显示元素或视频。 -
useSpeech
— 从文本字符串合成语音。 -
useVideo
— 播放视频,跟踪其状态,以及公开播放控件。 -
useWait
— UI的复杂等待管理。
-
-
动画效果
-
useRaf
— 在每个requestAnimationFrame
上重新呈现组件。 -
useSpring
— 根据弹簧动力学随时间插入数字。 -
useTimeout
— 超时后返回true。 -
useTween
— 重新渲染组件,同时补间0到1之间的数字。 -
useUpdate
— 返回一个回调,在调用时重新呈现组件。
-
-
副作用
-
useAsync
— 解析一个async
函数。 -
useAsyncFn
— 异步函数的状态管理。 -
useAsyncRetry
—useAsync
带有retry()
方法。 -
useBeforeUnload
— 当用户尝试重新加载或关闭页面时显示浏览器警报。 -
useCopyToClipboard
— 将文本复制到剪贴板。 -
useDebounce
— 防抖函数。 -
useFavicon
— 设置页面的favicon。 -
useLocalStorage
— 管理localStorage
中的值。 -
useLockBodyScroll
— 锁定body元素的滚动。 -
useSessionStorage
— 管理sessionStorage
中的值。 -
useThrottle
anduseThrottleFn
— 节流一个函数。 -
useTitle
— 设置页面标题。
-
-
生命周期
-
useEffectOnce
— 仅运行一次的修改后的useEffect
。 -
useEvent
— 订阅事件。 -
useLifecycles
— 调用mount
和unmount
回调。 -
useRefMounted
— 跟踪组件是否已挂载。 -
usePromise
— 仅在安装组件时解析promise。 -
useLogger
— 在组件经历生命周期时登录控制台。 -
useMount
— 调用mount
回调。 -
useUnmount
— 调用unmount
回调。 -
useUpdateEffect
— 仅在更新时运行一个effect
。 -
useDeepCompareEffect
— 运行一个effect
通过深度比较其依赖项。
-
-
状态
-
createMemo
— memoized hooks的工厂钩子。 -
useGetSet
— 返回状态 getterget()
而不是原始状态。 -
useGetSetState
— 就像useGetSet
和useSetState
有个孩子。 -
useObservable
— 跟踪Observable
的最新值。 -
useSetState
— 创建类似this.setState
的setState
方法。 -
useToggle
anduseBoolean
— 跟踪布尔值的状态。 -
useCounter
anduseNumber
— 跟踪数字的状态。 -
useList
— 跟踪数组的状态。 -
useMap
— 跟踪对象的状态。
-
Usage
你需要安装React 16.8.0
或更高版本才能使用Hooks API。你可以分别导入每个钩子
import useToggle from 'react-use/lib/useToggle'
或使用 ES6 命名导入
import {useToggle} from 'react-use'
根据绑定器的不同,你可能会在ES6命名导入语句中遇到缺少依赖项的错误。有些钩子要求安装对等依赖项,因此我们建议单独导入。如果你希望同时使用这两种方法,你可以通过将以下配置添加到.babelrc
文件中,将命名的导入语句转换为使用babel-plugin-import
的单个导入语句。
[
"import", {
"libraryName": "react-use",
"libraryDirectory": "lib",
"camel2DashComponentName": false
}
]
许可证
Unlicense — 公有领域
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].