Functions
Core
Add-ons
Sort by
Filters
State
Elements
Browser
useClipboard-响应式 Clipboard API。剪贴板 API 提供了响应剪贴板命令(剪切、复制和粘贴)与异步读写系统剪贴板的能力。从权限 Permissions API。获取权限之后,才能访问剪贴板内容;如果用户没有授予权限,则不允许读取或更改剪贴板内容。
useFullscreen-响应式Fullscreen API。它添加了以全屏模式呈现特定元素(及其后代)的方法,并在不再需要时退出全屏模式。这使得可以使用用户的整个屏幕呈现所需的内容(例如在线游戏),从屏幕上隐藏所有的浏览器用户界面以及其他应用,直到关闭全屏模式。
usePreferredLanguages-响应式 Navigator Languages。为web开发人员提供有关用户首选语言的信息。例如,这可能有助于根据用户的首选语言调整用户界面的语言,以提供更好的体验。
Sensors
useMousePressed-响应式鼠标按下状态。由目标元素的
mousedown
touchstart
事件触发,并由window上的 mouseup
mouseleave
touchend
touchcancel
事件释放。useNetwork-响应式 Network status。网络状态 API 可以获取到系统的网络连接信息,比如说连接方式是 WiFi 还是蜂窝。应用程序可以根据此信息为用户展现不同清晰度的内容。该 API 是由 NetworkInformation 接口和 Navigator 接口上新增的一个 connection 属性组成的。
Network
useEventSource-使用EventSource 或 Server-Sent-Events 实例会对 HTTP 服务开启一个持久化的连接,以 text/event-stream 格式发送事件。
Animation
Component
useVirtualList-轻松创建虚拟列表。虚拟列表(有时称为virtual scrollers)允许您高效地呈现大量的项。通过使用
wrapper
元素来模拟容器的完整高度,只呈现最少数量的DOM节点来显示 container
元素中的项。Watch
Reactivity
Array
Time
Utilities
useAsyncQueue-executes each asynchronous task sequentially and passes the current task result to the next task
@Electron
useIpcRendererOn-use ipcRenderer.on with ease and ipcRenderer.removeListener automatically on unmounted
@Firebase
@Head
@Integrations
@Math
@Motion
@Router
@RxJS
useSubscription-use an RxJS
Subscription
without worrying about unsubscribing from it or creating memory leaks