Replace most unsafe React lifecycle methods (#36970)

This commit is contained in:
diondiondion authored and GitHub committed 2025-11-25 13:49:45 +00:00
1 parent 861625fdca
commit 8c772028ac
13 files changed
+35 -32

No files matched your search

@@ -61,8 +61,14 @@ class ModifierPickerMenu extends PureComponent {
this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);
};
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.active) {
componentDidMount() {
if (this.props.active) {
this.attachListeners();
}
}
componentDidUpdate() {
if (this.props.active) {
this.attachListeners();
} else {
this.removeListeners();