FRONT005warningPro

useeffect-side-effect-unguarded

useEffect contains a mutating HTTP call without a guard against double-firing.

Applies to: JavaScript, TypeScript

Why this matters

React 18 Strict Mode double-fires useEffect in development to surface bugs. If your effect performs a POST, PUT, DELETE, or PATCH request without a useRef guard or AbortController, the mutation runs twice — creating duplicate records, double charges, or corrupted state. Add a ref guard (e.g., if (initiated.current) return) or an AbortController cleanup to prevent this.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, FRONT005 includedstablestack explain FRONT005

FRONT005 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: FRONT005