React Technical Debt
Code health of each React component and custom hook (a smooth function of its complexity and its leaking or every-render effects; the file reads as its worst unit), the file maintainability index shared with core, a hotspot label for units past the complexity threshold, and the god-component finding.
Technical debt is where the other React measurements are combined into one estimate of how costly a file is to change.
Code health (0-10) is computed for every component and custom hook from its debt points: its branches, loops, hooks, effects, props, contexts and memoization, half its cyclomatic complexity, plus 10 points for each effect that creates a resource without a cleanup and 5 for each effect without a dependency array. Health is 10 * 100 / (100 + points): smooth, so one more if moves it a little, and never exactly 0, so the worst units stay ordered. The file's health is its worst unit's.
Maintainability is the index @vipr/core reports for the same file — same inputs (decision points, Halstead volume, executable statements), same formula, same letter bands (A from 50, B 38, C 20, D 10). reactMaintainabilityIndex carries the same number: one file has one maintainability whichever plugin reports it.
The score is 60% health and 40% the maintainability score core gives that index.
A unit whose complexity reaches 50 is labelled a hotspot, with its issues, a priority and an estimated cost of delay. The label is information: it does not change the score.
Effects, props, contexts, hook counts, branching, cyclomatic complexity and unstable references are each reported by the analysis that owns the fact (temporal, coupling, hooks, structural, core, identity). Technical debt counts them but does not report them a second time; its own finding is the god component.
Severity guide
- info
- A signal worth being aware of but not requiring action.
- warning
- A pattern likely to cause subtle bugs or performance issues; refactor recommended.
- critical
- A pattern actively breaking expected behavior or contracts; fix immediately.
Remediation
Address the flagged pattern; the message field describes the specific instance.
Review the issue location and apply the React/Next.js best practice for the pattern. Each emission carries enough context to act on directly.