testing-library/react-hooks-testing-library
🐏 Simple and complete React hooks testing utilities that encourage good testing practices. observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2853
- days_rel: n/a
- days_push: 946
- n_releases_24m: 0
Adoption not part of the score
5259 stars · 230 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A Testing Library utility for testing React custom hooks by rendering them inside a test harness function component, with utilities like renderHook for updating inputs and asserting outputs. It supports react-test-renderer and react-dom renderers and is distributed as @testing-library/react-hooks.
Use cases
- test custom react hooks without writing wrapper components
- unit test a react hook that manages complex state logic
- test a hook library that isn't tied to a specific component
- assert hook return values and rerender with new inputs
- test hooks that use effects, context, or async updates
When to choose
- you're publishing a library of standalone custom hooks
- your hook is complex and hard to exercise through component tests
- you're on React 16.9–17 and need a dedicated hook test harness
When to avoid
- you're on React 18+, where renderHook is built into @testing-library/react
- your hook is only used by one component and is easy to test via that component
- you want an actively developed tool - this library is deprecated
Facets
library · maturity maintenance
testing mocking testing frontend web-development developer-tools react react-hooks testing-library unit-testing custom-hooks jest deprecated nodejs javascript web-server
4 sources
- readme: https://github.com/testing-library/react-hooks-testing-library · fetched 2026-08-28 · a0850dc43657
- homepage: https://react-hooks-testing-library.com · fetched 2026-08-29 · bc674183ff80
- site_page: https://react-hooks-testing-library.com/installation · fetched 2026-08-29 · a105372e8c46
- registry_npm: https://registry.npmjs.org/react-hooks-testing-library · fetched 2026-08-29 · 0ae17dd72394
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| testing-library/react-hooks-testing-library | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="testing-library/react-hooks-testing-library")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem