feat: +24 hooks (41 → 65) — Tiers 1–3, refreshed meta & banner - #6
Conversation
…st/set, keypress, scroll
Eight commonly-expected hooks (41 → 49), each with a colocated vitest test:
- useThrottle — twin of useDebounce (value throttled to one update/interval)
- usePrevious — previous render's value
- useUpdateEffect — useEffect that skips the initial mount
- useEffectOnce — run-once effect
- useList — array state (push/insertAt/updateAt/removeAt/clear/reset)
- useSet — Set state (add/remove/toggle/has/clear/reset)
- useKeyPress — true while a key is held (window listeners, SSR-safe)
- useWindowScroll — reactive { x, y } scroll position
All SSR-safe, typed public APIs, registered in the barrel + manifest; README
regenerated (49 hooks). Adds ROADMAP.md to track Tiers 1–2 + DX enhancements.
Library gate green (163 tests); docs build green (new hooks render gracefully).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replaces the static code-window banner with a "wall of hooks" composition: every hook name tiled as a chip, the well-known ones highlighted in cyan, with the message "49 React hooks. One import." cutting through on the left. Reads the count + names live from the manifest. Mirrored to apps/docs/public/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tier 2 — fills the thin `data` category (2 → 8): useAsync, useMutation, usePagination, useNetworkState, usePageVisibility, useIdle Tier 3 — rounding-out: useQueue, useDefault, useRafState, useDeepCompareEffect, useTextSelection, useLongPress, useHotkeys, useFullscreen, useBattery, usePermission All SSR-safe, typed public APIs, colocated vitest tests (196 total), registered in the barrel + manifest; README regenerated (65 hooks). Experimental-API hooks (fullscreen/battery/permission) guard for unavailability. ROADMAP updated — all three tiers' lib track ✅; per-hook docs demos remain the open track. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sharper description (typed, zero-dep, tree-shakable, SSR-safe, ESM+CJS) and expanded keywords (react, typescript, ssr, nextjs, tree-shakable, esm, plus popular hook names) for npm discoverability ahead of the next publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The wall-of-hooks banner reads the count + names live from the manifest; regenerated so it reads "65 React hooks. One import." Mirrored to public/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (78)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
Grows the catalog from 41 → 65 hooks across three tiers, all SSR-safe, typed, and tested.
Tier 1 — expected-pair gaps (8)
useThrottle·usePrevious·useUpdateEffect·useEffectOnce·useList·useSet·useKeyPress·useWindowScrollTier 2 — fills the thin
datacategory, 2 → 8 (6)useAsync·useMutation·usePagination·useNetworkState·usePageVisibility·useIdleTier 3 — rounding-out (10)
useQueue·useDefault·useRafState·useDeepCompareEffect·useTextSelection·useLongPress·useHotkeys·useFullscreen·useBattery·usePermissionAlso
packages/hookli/ROADMAP.md— tracks the tiers; all three lib tracks ✅, per-hook docs demos the remaining open track (new hooks currently render minimal auto-pages that degrade gracefully)Quality
tsc --noEmitclean · tsup build clean · docs site builds (65 pages)Backward-compatible → next publish is a minor (
1.5.0 → 1.6.0).🤖 Generated with Claude Code