Rules
no-unsafe-component-will-receive-props
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Warns the usage of UNSAFE_componentWillReceiveProps
in class components.
Using unsafe lifecycle methods like UNSAFE_componentWillReceiveProps
makes your component's behavior less predictable and are more likely to cause bugs.
Examples
Failing
Implementation
See Also
no-unsafe-component-will-mount
Prevents usage ofUNSAFE_componentWillMount
in class components.no-unsafe-component-will-update
Prevents usage ofUNSAFE_componentWillUpdate
in class components.