Skip to content
CAI
Software that uses CAICheck a score

streamich/react-use

62.3

Adequate · 28 September 2026

8.1k

lines of production code

TypeScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Storybook stories for new and existing hooks

Added Storybook stories for a wide range of hooks, including state management utilities (createGlobalState, createMemo, createReducer, createReducerContext, createStateContext, useBoolean, useCounter, useDefault, useGetSet, useGetSetState, useLatest), side effects (useAsync, useAsyncFn, useAsyncRetry, useBeforeUnload, useCookie, useCopyToClipboard, useDebounce, useError, useFavicon, useLifecycles), sensors (useBattery, useGeolocation, useHover, useHoverDirty, useIdle, useIntersection, useKey, useKeyPress, useKeyPressEvent, useKeyboardJs), UI components (useAudio, useClickAway, useCss, useDrop, useDropArea, useFullscreen), and lifecycle/animation hooks (useDeepCompareEffect, useCustomCompareEffect, useEffectOnce, useEnsuredForwardedRef, useHarmonicIntervalFn, useInterval, useIsomorphicLayoutEffect, useList, useRafLoop). These stories provide interactive demos and documentation for each hook.

stories · high confidence

Added new React hook and state management utilities

Introduced several new factory functions for React hooks and state management: createBreakpoint for responsive screen detection, createGlobalState for shared global state, createHTMLMediaHook for audio/video control, createMemo for memoized values, createReducer for Redux-like state management, createReducerContext for React context-based reducer state, createRenderProp for render-prop patterns, createRouter for routing context, and createStateContext for React context-based state. These additions expand the library's capabilities for managing side effects, media playback, and state in React applications.

src/factory · high confidence

Added utility functions and types for event handling and state resolution

New helper files were added to the misc directory: hookState.ts provides a resolveHookState function and associated types for managing hook state; util.ts introduces on and off functions for safely adding and removing event listeners, along with isBrowser and isNavigator environment checks; isDeepEqual.ts re-exports the fast-deep-equal/react library for deep equality checks; parseTimeRanges.ts adds a utility to convert time range objects into arrays; and types.ts exports generic TypeScript types for promises. These changes provide reusable utilities for state management, DOM event handling, and type definitions.

src/misc · high confidence

Initial Storybook configuration for component documentation

The project now includes a complete Storybook setup to document and develop UI components in isolation. This adds configuration files (.storybook/addons.js, config.js, and webpack.config.js) that register essential Storybook addons (knobs, actions, notes, options) and configure the build environment to handle TypeScript, JSX, and Markdown files. This enables developers to view and interact with components in a dedicated documentation environment.

.storybook · high confidence

New hooks and component for managing keys, async states, and drag-and-drop

Added the \UseKey\ component and \useKey\ hook for handling keyboard events, along with \useAsync\, \useAsyncFn\, and \useAsyncRetry\ hooks for managing asynchronous state. Also introduced \useDrop\ and \useDropArea\ hooks for implementing drag-and-drop zones, and \useBeforeUnload\ to handle browser unload events.

src · high confidence

Project infrastructure and tooling setup

The repository was initialized with essential configuration files to support development and build processes. This includes an .editorconfig for consistent code formatting, ESLint and Prettier configurations for code quality, a Babel configuration for transpilation, and Jest configurations for testing. Additionally, a TypeScript configuration (tsconfig.json) was added to manage compilation settings, and a .gitignore file was created to exclude build artifacts and IDE files from version control. These changes establish the foundational tooling for the project.

(repo-wide) · high confidence

Test coverage

Test coverage for new and existing hooks

Added comprehensive test suites for the \createBreakpoint\, \createGlobalState\, \createMemo\, \createReducer\, \createReducerContext\, \createStateContext\, and \hookState\ utilities, as well as \useAsync\, \useAsyncFn\, \useAudio\, \useBoolean\, \useCookie\, \useCopyToClipboard\, \useCounter\, \useCustomCompareEffect\, \useDebounce\, \useDeepCompareEffect\, \useDefault\, \useEffectOnce\, \useEnsuredForwardedRef\, \useError\, and \useEvent\ hooks. These tests verify correct initialization, state updates, side-effect cleanup, and edge case handling for these React hooks.

tests · high confidence

Dependencies

Update development dependencies

Updated various development dependencies including typescript-eslint, storybook, jest, and others to their latest compatible versions to maintain a secure and up-to-date development environment.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 45 → 62 (+17.8)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 74 → 94 (+19.5)
  • Architecture 83 (new)
  • Maturity 57 → 52 (-5.8)
  • Readiness 31 → 70 (+39.1)
  • Security 53 → 66 (+13.0)

Resolved (70)

  • Change coupling: index.ts ↔ useAudio.ts (src/index.ts)
  • Change coupling: index.ts ↔ useScratch.story.tsx (src/index.ts)
  • Change coupling: index.ts ↔ useWait.ts (src/index.ts)
  • Change coupling: useLongPress.ts ↔ useLongPress.story.tsx (src/useLongPress.ts)
  • Change coupling: useScratch.ts ↔ useScratch.story.tsx (src/useScratch.ts)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • …and 50 more

New (177)

  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • Critical CVE: [GHSA redacted] (yarn.lock)
  • …and 157 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

streamich/react-use was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fbe99c6327e6af94df03bc8bd6ecc5e3ff04fbcc — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-eb9197011364.