Skip to main content

React analyzer

React Reliability

Detects reliability issues in components and custom hooks: async operations with no error handler and member accesses that are nullable by construction. Effects that create a resource and never release it lower the reliability score; their findings are reported by `react-temporal`.

technical-debt react-reliability

React Reliability

Detects reliability issues in components and custom hooks: async operations with no error handler and member accesses that are nullable by construction. Effects that create a resource and never release it lower the reliability score; their findings are reported by `react-temporal`.

Reliability bugs in React show up as leaked listeners and timers, rejected promises nobody handles, and dereferences of values that are absent by construction (the result of .find(), a ref before it is attached). This analysis reports only what one file can prove: whether an arbitrary property access can meet null is a type-checker question, and whether an error boundary exists above a component is a property of the tree, so neither is reported here.

One finding per fact: an effect that creates a listener, interval, timer, socket, observer or subscription and returns no cleanup is reported once, by react-temporal (effect-*-no-cleanup, at the effect). Reliability reads the same effect facts (getEffectFacts()) and counts them in its score (the memory-leak ratio and one memory-leak failure mode per leaking listener, interval or subscription), but emits no insight for them.

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.

Documentation