useChange(observer, observable) |
Subscribe to value changes (like componentDidUpdate from class components) |
useDebouncedCallback(callback, delay) |
Apply debounce to callbackIf callback wasn’t invoked during specified time, last call will be invoked |
useDomRect(ref) |
Subscribe to changes of element’s DOMRect |
useEvent(callback) |
Get stable reference to event handler |
useForwardedRef(forwardedRef) |
Make proxy for ForwardedRef |
useInterval(callback, initialDelay) |
Let callback automatically run with specified time interval |
usePointerEvent(eventType, handler, options) |
Subscribe to pointer events |
usePointerEvent(eventType, handler, options) |
|
usePointerEvent(eventType, handler, options) |
|
usePortalRoot() |
Create root for React portal |
usePrevious(value) |
Get value from previous render |
usePrevious(value, initialValue) |
|
usePropState(prop) |
Create state from propThis state will by synced with prop |
useResize(ref, options) |
Subscribe to element’s resize |
useScroll(handler, options) |
Subscribe to scroll events |
useThrottledCallback(callback, timeout) |
Throttle callbackReduce frequency of callback invocations |
useToggle(value) |
Create boolean toggle |
useUserSelect(value, options) |
Sets user-select CSS property |
useWindowSize() |
Subscribe to changes of browser window’s width and height |