[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-997":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},997,"react-use","streamich\u002Freact-use","streamich","React Hooks — 👍","http:\u002F\u002Fstreamich.github.io\u002Freact-use",null,"TypeScript",43975,3272,259,367,0,1,24,62.9,"The Unlicense",false,"master",true,[],"2026-06-11 04:00:34","\u003Cdiv align=\"center\">\n  \u003Ch1>\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n    👍\n    \u003Cbr \u002F>\n    react-use\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n  \u003C\u002Fh1>\n  \u003Csup>\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Freact-use\">\n       \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Freact-use.svg\" alt=\"npm package\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcircleci.com\u002Fgh\u002Fstreamich\u002Freact-use\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fcircleci\u002Fproject\u002Fgithub\u002Fstreamich\u002Freact-use\u002Fmaster.svg\" alt=\"CircleCI master\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Freact-use\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Freact-use.svg\" alt=\"npm downloads\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"http:\u002F\u002Fstreamich.github.io\u002Freact-use\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemos-🚀-yellow.svg\" alt=\"demos\" \u002F>\n    \u003C\u002Fa>\n    \u003Cbr \u002F>\n    Collection of essential \u003Ca href=\"https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-intro.html\">React Hooks\u003C\u002Fa>.\u003C\u002Fem>\n    \u003Cem>Port of\u003C\u002Fem> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fstreamich\u002Flibreact\">\u003Ccode>libreact\u003C\u002Fcode>\u003C\u002Fa>.\n    \u003Cbr \u002F>\n    Translations: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzenghongtu\u002Freact-use-chinese\u002Fblob\u002Fmaster\u002FREADME.md\">🇨🇳 汉语\u003C\u002Fa>\n  \u003C\u002Fsup>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cpre>npm i \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Freact-use\">react-use\u003C\u002Fa>\u003C\u002Fpre>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n\u003C\u002Fdiv>\n\n- [**Sensors**](.\u002Fdocs\u002FSensors.md)\n  - [`useBattery`](.\u002Fdocs\u002FuseBattery.md) &mdash; tracks device battery state. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fqlvn662zww)\n  - [`useGeolocation`](.\u002Fdocs\u002FuseGeolocation.md) &mdash; tracks geo location state of user's device. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usegeolocation--demo)\n  - [`useHover` and `useHoverDirty`](.\u002Fdocs\u002FuseHover.md) &mdash; tracks mouse hover state of some element. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fzpn583rvx)\n  - [`useHash`](.\u002Fdocs\u002FuseHash.md) &mdash; tracks location hash value. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usehash--demo)\n  - [`useIdle`](.\u002Fdocs\u002FuseIdle.md) &mdash; tracks whether user is being inactive.\n  - [`useIntersection`](.\u002Fdocs\u002FuseIntersection.md) &mdash; tracks an HTML element's intersection. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-useintersection--demo)\n  - [`useKey`](.\u002Fdocs\u002FuseKey.md), [`useKeyPress`](.\u002Fdocs\u002FuseKeyPress.md), [`useKeyboardJs`](.\u002Fdocs\u002FuseKeyboardJs.md), and [`useKeyPressEvent`](.\u002Fdocs\u002FuseKeyPressEvent.md) &mdash; track keys. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usekeypressevent--demo)\n  - [`useLocation`](.\u002Fdocs\u002FuseLocation.md) and [`useSearchParam`](.\u002Fdocs\u002FuseSearchParam.md) &mdash; tracks page navigation bar location state.\n  - [`useLongPress`](.\u002Fdocs\u002FuseLongPress.md) &mdash; tracks long press gesture of some element.\n  - [`useMedia`](.\u002Fdocs\u002FuseMedia.md) &mdash; tracks state of a CSS media query. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usemedia--demo)\n  - [`useMediaDevices`](.\u002Fdocs\u002FuseMediaDevices.md) &mdash; tracks state of connected hardware devices.\n  - [`useMotion`](.\u002Fdocs\u002FuseMotion.md) &mdash; tracks state of device's motion sensor.\n  - [`useMouse` and `useMouseHovered`](.\u002Fdocs\u002FuseMouse.md) &mdash; tracks state of mouse position. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usemouse--docs)\n  - [`useMouseWheel`](.\u002Fdocs\u002FuseMouseWheel.md) &mdash; tracks deltaY of scrolled mouse wheel. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usemousewheel--docs)\n  - [`useNetworkState`](.\u002Fdocs\u002FuseNetworkState.md) &mdash; tracks the state of browser's network connection. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usenetworkstate--demo)\n  - [`useOrientation`](.\u002Fdocs\u002FuseOrientation.md) &mdash; tracks state of device's screen orientation.\n  - [`usePageLeave`](.\u002Fdocs\u002FusePageLeave.md) &mdash; triggers when mouse leaves page boundaries.\n  - [`useScratch`](.\u002Fdocs\u002FuseScratch.md) &mdash; tracks mouse click-and-scrub state.\n  - [`useScroll`](.\u002Fdocs\u002FuseScroll.md) &mdash; tracks an HTML element's scroll position. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usescroll--docs)\n  - [`useScrolling`](.\u002Fdocs\u002FuseScrolling.md) &mdash; tracks whether HTML element is scrolling.\n  - [`useStartTyping`](.\u002Fdocs\u002FuseStartTyping.md) &mdash; detects when user starts typing.\n  - [`useWindowScroll`](.\u002Fdocs\u002FuseWindowScroll.md) &mdash; tracks `Window` scroll position. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usewindowscroll--docs)\n  - [`useWindowSize`](.\u002Fdocs\u002FuseWindowSize.md) &mdash; tracks `Window` dimensions. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fm7ln22668)\n  - [`useMeasure`](.\u002Fdocs\u002FuseMeasure.md) and [`useSize`](.\u002Fdocs\u002FuseSize.md) &mdash; tracks an HTML element's dimensions. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usemeasure--demo)\n  - [`createBreakpoint`](.\u002Fdocs\u002FcreateBreakpoint.md) &mdash; tracks `innerWidth`\n  - [`useScrollbarWidth`](.\u002Fdocs\u002FuseScrollbarWidth.md) &mdash; detects browser's native scrollbars width. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usescrollbarwidth--demo)\n  - [`usePinchZoom`](.\u002Fdocs\u002FusePinchZoom.md) &mdash; tracks pointer events to detect pinch zoom in and out status. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fsensors-usePinchZoom--demo)\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**UI**](.\u002Fdocs\u002FUI.md)\n  - [`useAudio`](.\u002Fdocs\u002FuseAudio.md) &mdash; plays audio and exposes its controls. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002F2o4lo6rqy)\n  - [`useClickAway`](.\u002Fdocs\u002FuseClickAway.md) &mdash; triggers callback when user clicks outside target area.\n  - [`useCss`](.\u002Fdocs\u002FuseCss.md) &mdash; dynamically adjusts CSS.\n  - [`useDrop` and `useDropArea`](.\u002Fdocs\u002FuseDrop.md) &mdash; tracks file, link and copy-paste drops.\n  - [`useFullscreen`](.\u002Fdocs\u002FuseFullscreen.md) &mdash; display an element or video full-screen. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fui-usefullscreen--demo)\n  - [`useSlider`](.\u002Fdocs\u002FuseSlider.md) &mdash; provides slide behavior over any HTML element. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fui-useslider--demo)\n  - [`useSpeech`](.\u002Fdocs\u002FuseSpeech.md) &mdash; synthesizes speech from a text string. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fn090mqz69m)\n  - [`useVibrate`](.\u002Fdocs\u002FuseVibrate.md) &mdash; provide physical feedback using the [Vibration API](https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FVibration_API). [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fui-usevibrate--demo)\n  - [`useVideo`](.\u002Fdocs\u002FuseVideo.md) &mdash; plays video, tracks its state, and exposes playback controls. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fui-usevideo--demo)\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**Animations**](.\u002Fdocs\u002FAnimations.md)\n  - [`useRaf`](.\u002Fdocs\u002FuseRaf.md) &mdash; re-renders component on each `requestAnimationFrame`.\n  - [`useInterval`](.\u002Fdocs\u002FuseInterval.md) and [`useHarmonicIntervalFn`](.\u002Fdocs\u002FuseHarmonicIntervalFn.md) &mdash; re-renders component on a set interval using `setInterval`.\n  - [`useSpring`](.\u002Fdocs\u002FuseSpring.md) &mdash; interpolates number over time according to spring dynamics.\n  - [`useTimeout`](.\u002Fdocs\u002FuseTimeout.md) &mdash; re-renders component after a timeout.\n  - [`useTimeoutFn`](.\u002Fdocs\u002FuseTimeoutFn.md) &mdash; calls given function after a timeout. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fanimation-usetimeoutfn--demo)\n  - [`useTween`](.\u002Fdocs\u002FuseTween.md) &mdash; re-renders component, while tweening a number from 0 to 1. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002F52990wwzyl)\n  - [`useUpdate`](.\u002Fdocs\u002FuseUpdate.md) &mdash; returns a callback, which re-renders component when called.\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**Side-effects**](.\u002Fdocs\u002FSide-effects.md)\n  - [`useAsync`](.\u002Fdocs\u002FuseAsync.md), [`useAsyncFn`](.\u002Fdocs\u002FuseAsyncFn.md), and [`useAsyncRetry`](.\u002Fdocs\u002FuseAsyncRetry.md) &mdash; resolves an `async` function.\n  - [`useBeforeUnload`](.\u002Fdocs\u002FuseBeforeUnload.md) &mdash; shows browser alert when user try to reload or close the page.\n  - [`useCookie`](.\u002Fdocs\u002FuseCookie.md) &mdash; provides way to read, update and delete a cookie. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fside-effects-usecookie--demo)\n  - [`useCopyToClipboard`](.\u002Fdocs\u002FuseCopyToClipboard.md) &mdash; copies text to clipboard.\n  - [`useDebounce`](.\u002Fdocs\u002FuseDebounce.md) &mdash; debounces a function. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fside-effects-usedebounce--demo)\n  - [`useError`](.\u002Fdocs\u002FuseError.md) &mdash; error dispatcher. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fside-effects-useerror--demo)\n  - [`useFavicon`](.\u002Fdocs\u002FuseFavicon.md) &mdash; sets favicon of the page.\n  - [`useLocalStorage`](.\u002Fdocs\u002FuseLocalStorage.md) &mdash; manages a value in `localStorage`.\n  - [`useLockBodyScroll`](.\u002Fdocs\u002FuseLockBodyScroll.md) &mdash; lock scrolling of the body element.\n  - [`useRafLoop`](.\u002Fdocs\u002FuseRafLoop.md) &mdash; calls given function inside the RAF loop.\n  - [`useSessionStorage`](.\u002Fdocs\u002FuseSessionStorage.md) &mdash; manages a value in `sessionStorage`.\n  - [`useThrottle` and `useThrottleFn`](.\u002Fdocs\u002FuseThrottle.md) &mdash; throttles a function. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fside-effects-usethrottle--demo)\n  - [`useTitle`](.\u002Fdocs\u002FuseTitle.md) &mdash; sets title of the page.\n  - [`usePermission`](.\u002Fdocs\u002FusePermission.md) &mdash; query permission status for browser APIs.\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**Lifecycles**](.\u002Fdocs\u002FLifecycles.md)\n  - [`useEffectOnce`](.\u002Fdocs\u002FuseEffectOnce.md) &mdash; a modified [`useEffect`](https:\u002F\u002Freactjs.org\u002Fdocs\u002Fhooks-reference.html#useeffect) hook that only runs once.\n  - [`useEvent`](.\u002Fdocs\u002FuseEvent.md) &mdash; subscribe to events.\n  - [`useLifecycles`](.\u002Fdocs\u002FuseLifecycles.md) &mdash; calls `mount` and `unmount` callbacks.\n  - [`useMountedState`](.\u002Fdocs\u002FuseMountedState.md) and [`useUnmountPromise`](.\u002Fdocs\u002FuseUnmountPromise.md) &mdash; track if component is mounted.\n  - [`usePromise`](.\u002Fdocs\u002FusePromise.md) &mdash; resolves promise only while component is mounted.\n  - [`useLogger`](.\u002Fdocs\u002FuseLogger.md) &mdash; logs in console as component goes through life-cycles.\n  - [`useMount`](.\u002Fdocs\u002FuseMount.md) &mdash; calls `mount` callbacks.\n  - [`useUnmount`](.\u002Fdocs\u002FuseUnmount.md) &mdash; calls `unmount` callbacks.\n  - [`useUpdateEffect`](.\u002Fdocs\u002FuseUpdateEffect.md) &mdash; run an `effect` only on updates.\n  - [`useIsomorphicLayoutEffect`](.\u002Fdocs\u002FuseIsomorphicLayoutEffect.md) &mdash; `useLayoutEffect` that that works on server.\n  - [`useDeepCompareEffect`](.\u002Fdocs\u002FuseDeepCompareEffect.md), [`useShallowCompareEffect`](.\u002Fdocs\u002FuseShallowCompareEffect.md), and [`useCustomCompareEffect`](.\u002Fdocs\u002FuseCustomCompareEffect.md)\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**State**](.\u002Fdocs\u002FState.md)\n  - [`createMemo`](.\u002Fdocs\u002FcreateMemo.md) &mdash; factory of memoized hooks.\n  - [`createReducer`](.\u002Fdocs\u002FcreateReducer.md) &mdash; factory of reducer hooks with custom middleware.\n  - [`createReducerContext`](.\u002Fdocs\u002FcreateReducerContext.md) and [`createStateContext`](.\u002Fdocs\u002FcreateStateContext.md) &mdash; factory of hooks for a sharing state between components.\n  - [`useDefault`](.\u002Fdocs\u002FuseDefault.md) &mdash; returns the default value when state is `null` or `undefined`.\n  - [`useGetSet`](.\u002Fdocs\u002FuseGetSet.md) &mdash; returns state getter `get()` instead of raw state.\n  - [`useGetSetState`](.\u002Fdocs\u002FuseGetSetState.md) &mdash; as if [`useGetSet`](.\u002Fdocs\u002FuseGetSet.md) and [`useSetState`](.\u002Fdocs\u002FuseSetState.md) had a baby.\n  - [`useLatest`](.\u002Fdocs\u002FuseLatest.md) &mdash; returns the latest state or props\n  - [`usePrevious`](.\u002Fdocs\u002FusePrevious.md) &mdash; returns the previous state or props. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Ffervent-galileo-krgx6)\n  - [`usePreviousDistinct`](.\u002Fdocs\u002FusePreviousDistinct.md) &mdash; like `usePrevious` but with a predicate to determine if `previous` should update.\n  - [`useObservable`](.\u002Fdocs\u002FuseObservable.md) &mdash; tracks latest value of an `Observable`.\n  - [`useRafState`](.\u002Fdocs\u002FuseRafState.md) &mdash; creates `setState` method which only updates after `requestAnimationFrame`. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-userafstate--demo)\n  - [`useSetState`](.\u002Fdocs\u002FuseSetState.md) &mdash; creates `setState` method which works like `this.setState`. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fn75zqn1xp0)\n  - [`useStateList`](.\u002Fdocs\u002FuseStateList.md) &mdash; circularly iterates over an array. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fbold-dewdney-pjzkd)\n  - [`useToggle` and `useBoolean`](.\u002Fdocs\u002FuseToggle.md) &mdash; tracks state of a boolean. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Ffocused-sammet-brw2d)\n  - [`useCounter` and `useNumber`](.\u002Fdocs\u002FuseCounter.md) &mdash; tracks state of a number. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usecounter--demo)\n  - [`useList`](.\u002Fdocs\u002FuseList.md) ~and [`useUpsert`](.\u002Fdocs\u002FuseUpsert.md)~ &mdash; tracks state of an array. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fwonderful-mahavira-1sm0w)\n  - [`useMap`](.\u002Fdocs\u002FuseMap.md) &mdash; tracks state of an object. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fquirky-dewdney-gi161)\n  - [`useSet`](.\u002Fdocs\u002FuseSet.md) &mdash; tracks state of a Set. [![][img-demo]](https:\u002F\u002Fcodesandbox.io\u002Fs\u002Fbold-shtern-6jlgw)\n  - [`useQueue`](.\u002Fdocs\u002FuseQueue.md) &mdash; implements simple queue.\n  - [`useStateValidator`](.\u002Fdocs\u002FuseStateValidator.md) &mdash; tracks state of an object. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usestatevalidator--demo)\n  - [`useStateWithHistory`](.\u002Fdocs\u002FuseStateWithHistory.md) &mdash; stores previous state values and provides handles to travel through them. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usestatewithhistory--demo)\n  - [`useMultiStateValidator`](.\u002Fdocs\u002FuseMultiStateValidator.md) &mdash; alike the `useStateValidator`, but tracks multiple states at a time. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usemultistatevalidator--demo)\n  - [`useMediatedState`](.\u002Fdocs\u002FuseMediatedState.md) &mdash; like the regular `useState` but with mediation by custom function. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usemediatedstate--demo)\n  - [`useFirstMountState`](.\u002Fdocs\u002FuseFirstMountState.md) &mdash; check if current render is first. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usefirstmountstate--demo)\n  - [`useRendersCount`](.\u002Fdocs\u002FuseRendersCount.md) &mdash; count component renders. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-userenderscount--demo)\n  - [`createGlobalState`](.\u002Fdocs\u002FcreateGlobalState.md) &mdash; cross component shared state.[![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-createglobalstate--demo)\n  - [`useMethods`](.\u002Fdocs\u002FuseMethods.md) &mdash; neat alternative to `useReducer`. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-usemethods--demo)\n    \u003Cbr\u002F>\n    \u003Cbr\u002F>\n- [**Miscellaneous**]()\n  - [`useEnsuredForwardedRef`](.\u002Fdocs\u002FuseEnsuredForwardedRef.md) and [`ensuredForwardRef`](.\u002Fdocs\u002FuseEnsuredForwardedRef.md) &mdash; use a React.forwardedRef safely. [![][img-demo]](https:\u002F\u002Fstreamich.github.io\u002Freact-use\u002F?path=\u002Fstory\u002Fstate-useensuredforwardedref--demo)\n\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\".\u002Fdocs\u002FUsage.md\">\u003Cstrong>Usage\u003C\u002Fstrong>\u003C\u002Fa> &mdash; how to import.\n  \u003Cbr \u002F>\n  \u003Ca href=\".\u002FLICENSE\">\u003Cstrong>Unlicense\u003C\u002Fstrong>\u003C\u002Fa> &mdash; public domain.\n  \u003Cbr \u002F>\n  \u003Ca href=\"https:\u002F\u002Fopencollective.com\u002Freact-use\u002Fcontribute\">\u003Cstrong>Support\u003C\u002Fstrong>\u003C\u002Fa> &mdash; add yourself to backer list below.\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\n[img-demo]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-%20%20%20%F0%9F%9A%80-green.svg\n\n\u003Cdiv align=\"center\">\n  \u003Ch1>Contributors\u003C\u002Fh1>\n\u003C\u002Fdiv>\n\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fstreamich\u002Freact-use\u002Fgraphs\u002Fcontributors\">\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Freact-use\u002Fcontributors.svg?width=890&button=false\" \u002F>\u003C\u002Fa>\n\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n\u003Cbr \u002F>\n","react-use 是一个为 React 应用提供多种实用 Hooks 的库。它包含了一系列核心功能，如跟踪设备电池状态、地理位置、鼠标悬停状态、页面位置哈希值等，以及监测用户活动状态和长按手势等功能，极大地丰富了开发者在构建响应式界面时的工具集。这些 Hooks 采用 TypeScript 编写，确保了代码质量和类型安全。该库适用于需要增强用户体验的各种 Web 应用场景，特别是那些依赖于与用户交互或环境感知的应用程序。",2,"2026-06-11 02:40:47","top_all"]