MCPcopy
hub / github.com/streamich/react-use

github.com/streamich/react-use @v17.6.1 sqlite

repository ↗ · DeepWiki ↗ · release v17.6.1 ↗
579 symbols 1,706 edges 327 files 1 documented · 0%
README

👍 react-use

<a href="https://www.npmjs.com/package/react-use">
   <img src="https://img.shields.io/npm/v/react-use.svg" alt="npm package" />
</a>
<a href="https://circleci.com/gh/streamich/react-use">
  <img src="https://img.shields.io/circleci/project/github/streamich/react-use/master.svg" alt="CircleCI master" />
</a>
<a href="https://www.npmjs.com/package/react-use">
  <img src="https://img.shields.io/npm/dm/react-use.svg" alt="npm downloads" />
</a>
<a href="http://streamich.github.io/react-use">
  <img src="https://img.shields.io/badge/demos-🚀-yellow.svg" alt="demos" />
</a>



Collection of essential <a href="https://reactjs.org/docs/hooks-intro.html">React Hooks</a>.</em>
<em>Port of</em> <a href="https://github.com/streamich/libreact"><code>libreact</code></a>.



Translations: <a href="https://github.com/zenghongtu/react-use-chinese/blob/master/README.md">🇨🇳 汉语</a>

npm i react-use

Extension points exported contracts — how you extend this code

RequestAnimationFrame (Interface)
* New requestAnimationFrame after being replaced with raf-stub for testing purposes.
tests/useRaf.test.ts
State (Interface)
(no doc)
src/useScroll.ts
State (Interface)
(no doc)
src/useSize.tsx
UseMouseHoveredOptions (Interface)
(no doc)
src/useMouseHovered.ts
MotionSensorState (Interface)
(no doc)
src/useMotion.ts
DropAreaState (Interface)
(no doc)
src/useDropArea.ts
OrientationState (Interface)
(no doc)
src/useOrientation.ts
State (Interface)
(no doc)
src/useSlider.ts

Core symbols most depended-on inside this repo

setState
called by 88
src/factory/createGlobalState.ts
off
called by 62
src/misc/util.ts
on
called by 57
src/misc/util.ts
step
called by 43
tests/useRafState.test.ts
set
called by 27
src/useIdle.ts
useLocalStorage
called by 24
src/useLocalStorage.ts
resolveHookState
called by 18
src/misc/hookState.ts
useCounter
called by 17
src/useCounter.ts

Shape

Function 489
Interface 66
Method 16
Class 6
Enum 2

Languages

TypeScript100%

Modules by API surface

src/factory/createHTMLMediaHook.ts14 symbols
src/useScratch.ts12 symbols
src/useDrop.ts11 symbols
src/useSlider.ts10 symbols
src/useEvent.ts9 symbols
src/useLocation.ts8 symbols
stories/useError.story.tsx7 symbols
tests/createReducerContext.test.tsx6 symbols
src/useSize.tsx6 symbols
src/useSet.ts6 symbols
src/usePinchZoom.ts6 symbols
src/useDropArea.ts6 symbols

Dependencies from manifests, versioned

@babel/core7.28.3 · 1×
@babel/plugin-syntax-dynamic-import7.8.3 · 1×
@babel/preset-env7.28.3 · 1×
@babel/preset-react7.27.1 · 1×
@babel/preset-typescript7.27.1 · 1×
@semantic-release/changelog6.0.3 · 1×
@semantic-release/git10.0.1 · 1×
@semantic-release/npm12.0.2 · 1×
@shopify/jest-dom-mocks2.11.7 · 1×
@storybook/addon-actions6.4.9 · 1×
@storybook/addon-knobs6.4.0 · 1×
@storybook/addon-notes5.3.21 · 1×

For agents

$ claude mcp add react-use \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact