Skip to main content

React analyzer

React Anti-Patterns

Detects React-specific anti-patterns: stale closures, prop drilling, conditional hooks, unstable dependencies, mutation in render.

anti-patterns react-anti-patterns

React Anti-Patterns

Detects React-specific anti-patterns: stale closures, prop drilling, conditional hooks, unstable dependencies, mutation in render.

React has subtle rules about hooks, rendering purity, and state ownership that are easy to violate without immediate breakage. This analysis surfaces the patterns most likely to cause bugs — conditional hook calls, missing dependencies, mutations during render, and dependency-array foot-guns.

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