Skip to main content

React analyzer

React Dataflow

Tracks how data flows through components: state-setter call sites per component or hook, props that are only forwarded from component to component (prop drilling), array-transform chains and derived values.

performance react-dataflow

React Dataflow

Tracks how data flows through components: state-setter call sites per component or hook, props that are only forwarded from component to component (prop drilling), array-transform chains and derived values.

Inefficient data flow patterns (deeply derived state, redundant lifting, prop chains where context would serve) cause unnecessary re-renders and complicate component lifecycle. This analysis flags patterns that hurt performance or readability.

The dataflow score is measured per unit (component or custom hook) and the file reads as its worst unit (ADR 0065): a unit's state-setter call sites, refs, derived values and longest array-method chain count for the unit that owns them, and a prop-drilling chain counts for every component that forwards along it. Its 0-100 view is 100 * 100 / (100 + points): it never reaches 0. Dataflow is not part of the React complexity composite.

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