To address a variety of complex and diverse business scenarios, this library provides a large number of high-quality, efficient React Hooks to help you build applications faster. It covers aspects ranging from basic effect handling
, data fetching
, state management
, UI state
, utility tools
to more business-oriented uses like browser API
, common scenes
, high-frequency business logic
, and more.
Please, don't panic. Not all Hooks need to be mastered.
Next, this article will guide you to quickly understand the main contents of this library, giving you a general overview. This way, you can quickly recall in actual development scenarios that there might be corresponding Hooks here to solve problems, and then you can refer to the specific usage documentation.
This library organizes various Hooks by type, divided into the following nine parts, and the homepage navigation is also based on this classification:
useMount
, useUnmount
, useUpdateEffect
, etc.useSafeState
, useRafState
, useSetState
, etc., and derived states.useElementSize
, useFocus
, useScroll
, useDropZone
, etc.useClipboard
, useFullscreen
, useBattery
, useBluetooth
, useEyeDropper
, useResizeObserver
, etc.useKeyPress
, useGeolocation
, useFps
, useMouse
, useUserIdle
, etc.useIntervalFn
, useTimeoutFn
, useRafFn
, etc.useOnline
and useNetwork
.useAsyncFn
, useCountdown
, useDateFormat
, useDebouncedFn
, useRetryFn
, useTimeAgo
, useEventBus
, etc.useQuery
, useDynamicList
, usePagination
, useVirtualList
, etc.This library organizes various Hooks by functionality and application scenarios, roughly divided into the following parts:
useMount
, useUnmount
, useUpdateEffect
, useSafeState
, etc.useAsyncFn
, useQuery
, etc.useAsyncFn
, useHover
, useFocus
, useRetryFn
, etc.useClipboard
, useFullscreen
, useBattery
, useBluetooth
, useEyeDropper
, useResizeObserver
, etc.useEventListener
, useNow
, useDateFormat
, useTimeAgo
, useCountdown
, useAsyncLock
, useEventBus
, etc.useVirtualList
, useDynamicList
, usePagination
, etc.useSafeState
, useRafState
, useDebouncedFn
, useThrottledFn
, etc.