You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust no-unsafe rule to handle all unsafe life-cycle methods
- Adjust `no-unsafe` rule to handle all unsafe life-cycle methods including their aliases.
- Add instructions on updating components to be consistent with React runtime warnings.
Copy file name to clipboardExpand all lines: docs/rules/no-unsafe.md
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,27 @@
1
-
# Prevent usage of `UNSAFE_` methods (react/no-unsafe)
1
+
# Prevent usage of unsafe lifecycle methods (react/no-unsafe)
2
2
3
3
Certain legacy lifecycle methods are [unsafe for use in async React applications][async_rendering] and cause warnings in [_strict mode_][strict_mode]. These also happen to be the lifecycles that cause the most [confusion within the React community][component_lifecycle_changes].
0 commit comments