Skip to main content

What it flags

A useEffect or useLayoutEffect with no dependency array sets state to a new object, array or computed value on every run, so the component re-renders without end. Setting a constant such as true is not reported, because React bails out when the value is unchanged.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: