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