Will It Vibe logoWill It Vibe?
REACT-012Medium severity-8 points

Deprecated or unsafe lifecycle method

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

componentWillMount, componentWillReceiveProps, and componentWillUpdate (and their UNSAFE_ aliases) are legacy lifecycles removed from the concurrent rendering model. They fire unpredictably and are removed in React 19.

Why it matters

componentWillMount, componentWillReceiveProps, and componentWillUpdate are legacy lifecycle methods that fire unpredictably under the modern rendering model and are removed in React 19, so this code will break on upgrade. Their UNSAFE_ aliases are a temporary bridge, not a fix.

How to fix it

Migrate each one to a supported approach: move componentWillMount work into the constructor or componentDidMount, replace componentWillReceiveProps with getDerivedStateFromProps or a keyed remount, and replace componentWillUpdate with getSnapshotBeforeUpdate or componentDidUpdate. Better still, convert the component to a function component with hooks.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Code Quality & Syntax checks