Skip to main content

React analyzer

React Temporal Patterns

Analyses effects in components and custom hooks: resources created without a cleanup (listeners, timers, intervals, sockets, observers, subscriptions), async work that sets state with nothing to cancel a stale run, and dependency arrays that are missing, too long or rebuilt on every render.

technical-debt react-temporal

React Temporal Patterns

Analyses effects in components and custom hooks: resources created without a cleanup (listeners, timers, intervals, sockets, observers, subscriptions), async work that sets state with nothing to cancel a stale run, and dependency arrays that are missing, too long or rebuilt on every render.

Temporal coupling in React manifests as effects that depend on side effects from other effects, setState calls that compete during the same render, and dependency arrays that mismatch the actual data lifecycle. This analysis surfaces patterns where the order of effects matters but is not explicit.

It is the one owner of effect-lifecycle findings: an effect that creates a resource and returns no cleanup is reported here, once, at the effect (react-reliability counts the same effect in its score and emits nothing for it). A leak is critical only when it is proven by construction: a listener on window / document, an interval or a socket whose handle nothing but the effect can reach, or a subscription to a source that outlives the component (a global, an import, a module-level object) whose unsubscribe handle is kept nowhere. Everything else, including a one-shot timeout and an observer, is at most a warning.

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