chore(deps): update babel monorepo to v7.28.3 (#2666) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore(deps): update babel monorepo to v7.28.3 (#2666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
libreact
npm i react-use
useBattery
useGeolocation
useHover
useHoverDirty
useHash
useIdle
useIntersection
useKey
useKeyPress
useKeyboardJs
useKeyPressEvent
useLocation
useSearchParam
useLongPress
useMedia
useMediaDevices
useMotion
useMouse
useMouseHovered
useMouseWheel
useNetworkState
useOrientation
usePageLeave
useScratch
useScroll
useScrolling
useStartTyping
useWindowScroll
Window
useWindowSize
useMeasure
useSize
createBreakpoint
innerWidth
useScrollbarWidth
usePinchZoom
useAudio
useClickAway
useCss
useDrop
useDropArea
useFullscreen
useSlider
useSpeech
useVibrate
useVideo
useRaf
requestAnimationFrame
useInterval
useHarmonicIntervalFn
setInterval
useSpring
useTimeout
useTimeoutFn
useTween
useUpdate
useAsync
useAsyncFn
useAsyncRetry
async
useBeforeUnload
useCookie
useCopyToClipboard
useDebounce
useError
useFavicon
useLocalStorage
localStorage
useLockBodyScroll
useRafLoop
useSessionStorage
sessionStorage
useThrottle
useThrottleFn
useTitle
usePermission
useEffectOnce
useEffect
useEvent
useLifecycles
mount
unmount
useMountedState
useUnmountPromise
usePromise
useLogger
useMount
useUnmount
useUpdateEffect
effect
useIsomorphicLayoutEffect
useLayoutEffect
useDeepCompareEffect
useShallowCompareEffect
useCustomCompareEffect
createMemo
createReducer
createReducerContext
createStateContext
useDefault
null
undefined
useGetSet
get()
useGetSetState
useSetState
useLatest
usePrevious
usePreviousDistinct
previous
useObservable
Observable
useRafState
setState
this.setState
useStateList
useToggle
useBoolean
useCounter
useNumber
useList
useUpsert
useMap
useSet
useQueue
useStateValidator
useStateWithHistory
useMultiStateValidator
useMediatedState
useState
useFirstMountState
useRendersCount
createGlobalState
useMethods
useReducer
useEnsuredForwardedRef
ensuredForwardRef
Usage — how to import. Unlicense — public domain. Support — add yourself to backer list below.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
👍
react-use
Collection of essential React Hooks. Port of
libreact.Translations: 🇨🇳 汉语
useBattery— tracks device battery state.useGeolocation— tracks geo location state of user’s device.useHoveranduseHoverDirty— tracks mouse hover state of some element.useHash— tracks location hash value.useIdle— tracks whether user is being inactive.useIntersection— tracks an HTML element’s intersection.useKey,useKeyPress,useKeyboardJs, anduseKeyPressEvent— track keys.useLocationanduseSearchParam— tracks page navigation bar location state.useLongPress— tracks long press gesture of some element.useMedia— tracks state of a CSS media query.useMediaDevices— tracks state of connected hardware devices.useMotion— tracks state of device’s motion sensor.useMouseanduseMouseHovered— tracks state of mouse position.useMouseWheel— tracks deltaY of scrolled mouse wheel.useNetworkState— tracks the state of browser’s network connection.useOrientation— tracks state of device’s screen orientation.usePageLeave— triggers when mouse leaves page boundaries.useScratch— tracks mouse click-and-scrub state.useScroll— tracks an HTML element’s scroll position.useScrolling— tracks whether HTML element is scrolling.useStartTyping— detects when user starts typing.useWindowScroll— tracksWindowscroll position.useWindowSize— tracksWindowdimensions.useMeasureanduseSize— tracks an HTML element’s dimensions.createBreakpoint— tracksinnerWidthuseScrollbarWidth— detects browser’s native scrollbars width.usePinchZoom— tracks pointer events to detect pinch zoom in and out status.useAudio— plays audio and exposes its controls.useClickAway— triggers callback when user clicks outside target area.useCss— dynamically adjusts CSS.useDropanduseDropArea— tracks file, link and copy-paste drops.useFullscreen— display an element or video full-screen.useSlider— provides slide behavior over any HTML element.useSpeech— synthesizes speech from a text string.useVibrate— provide physical feedback using the Vibration API.useVideo— plays video, tracks its state, and exposes playback controls.useRaf— re-renders component on eachrequestAnimationFrame.useIntervalanduseHarmonicIntervalFn— re-renders component on a set interval usingsetInterval.useSpring— interpolates number over time according to spring dynamics.useTimeout— re-renders component after a timeout.useTimeoutFn— calls given function after a timeout.useTween— re-renders component, while tweening a number from 0 to 1.useUpdate— returns a callback, which re-renders component when called.useAsync,useAsyncFn, anduseAsyncRetry— resolves anasyncfunction.useBeforeUnload— shows browser alert when user try to reload or close the page.useCookie— provides way to read, update and delete a cookie.useCopyToClipboard— copies text to clipboard.useDebounce— debounces a function.useError— error dispatcher.useFavicon— sets favicon of the page.useLocalStorage— manages a value inlocalStorage.useLockBodyScroll— lock scrolling of the body element.useRafLoop— calls given function inside the RAF loop.useSessionStorage— manages a value insessionStorage.useThrottleanduseThrottleFn— throttles a function.useTitle— sets title of the page.usePermission— query permission status for browser APIs.useEffectOnce— a modifieduseEffecthook that only runs once.useEvent— subscribe to events.useLifecycles— callsmountandunmountcallbacks.useMountedStateanduseUnmountPromise— track if component is mounted.usePromise— resolves promise only while component is mounted.useLogger— logs in console as component goes through life-cycles.useMount— callsmountcallbacks.useUnmount— callsunmountcallbacks.useUpdateEffect— run aneffectonly on updates.useIsomorphicLayoutEffect—useLayoutEffectthat that works on server.useDeepCompareEffect,useShallowCompareEffect, anduseCustomCompareEffectcreateMemo— factory of memoized hooks.createReducer— factory of reducer hooks with custom middleware.createReducerContextandcreateStateContext— factory of hooks for a sharing state between components.useDefault— returns the default value when state isnullorundefined.useGetSet— returns state getterget()instead of raw state.useGetSetState— as ifuseGetSetanduseSetStatehad a baby.useLatest— returns the latest state or propsusePrevious— returns the previous state or props.usePreviousDistinct— likeusePreviousbut with a predicate to determine ifpreviousshould update.useObservable— tracks latest value of anObservable.useRafState— createssetStatemethod which only updates afterrequestAnimationFrame.useSetState— createssetStatemethod which works likethis.setState.useStateList— circularly iterates over an array.useToggleanduseBoolean— tracks state of a boolean.useCounteranduseNumber— tracks state of a number.useListand— tracks state of an array.useUpsertuseMap— tracks state of an object.useSet— tracks state of a Set.useQueue— implements simple queue.useStateValidator— tracks state of an object.useStateWithHistory— stores previous state values and provides handles to travel through them.useMultiStateValidator— alike theuseStateValidator, but tracks multiple states at a time.useMediatedState— like the regularuseStatebut with mediation by custom function.useFirstMountState— check if current render is first.useRendersCount— count component renders.createGlobalState— cross component shared state.useMethods— neat alternative touseReducer.useEnsuredForwardedRefandensuredForwardRef— use a React.forwardedRef safely.Usage — how to import.
Unlicense — public domain.
Support — add yourself to backer list below.
Contributors