Rules
no-component-will-update
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔄
Presets
core
recommended
recommended-typescript
recommended-type-checked
Description
Replaces usages of componentWillUpdate
with UNSAFE_componentWillUpdate
.
This API has been renamed from componentWillUpdate
to UNSAFE_componentWillUpdate
. The old name has been deprecated. In a future major version of React, only the new name will work.
Examples
Before
After
Implementation
Further Reading
See Also
- no-component-will-mount
Replaces usages ofcomponentWillMount
withUNSAFE_componentWillMount
. - no-component-will-receive-props
Replaces usages ofcomponentWillReceiveProps
withUNSAFE_componentWillReceiveProps
.