Skip to main content

React analyzer

React Coupling

Measures how much a component depends on its surroundings: number of props (destructured or read as props.x), callback props, context consumption (also in custom hooks), ref forwarding and children usage.

technical-debt react-coupling

React Coupling

Measures how much a component depends on its surroundings: number of props (destructured or read as props.x), callback props, context consumption (also in custom hooks), ref forwarding and children usage.

High coupling between React components makes refactors expensive, because changes to one component ripple through every caller. The analysis flags prop sprawl, deep prop drilling (signaling missing context), and over-coupled component trees.

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