Remove all usages of UNSAFE_* React methods (#9583)

This commit is contained in:
Michael Telatynski 2022-11-18 09:22:43 +00:00 committed by GitHub
parent 38dbe8ed33
commit 590b845f3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 585 additions and 413 deletions

View file

@ -96,8 +96,7 @@ export default class MemberList extends React.Component<IProps, IState> {
this.showPresence = enablePresenceByHsUrl?.[hsUrl] ?? true;
}
// eslint-disable-next-line
UNSAFE_componentWillMount() {
public componentDidMount() {
const cli = MatrixClientPeg.get();
this.mounted = true;
if (cli.hasLazyLoadMembersEnabled()) {
@ -121,7 +120,7 @@ export default class MemberList extends React.Component<IProps, IState> {
cli.on(UserEvent.CurrentlyActive, this.onUserPresenceChange);
}
componentWillUnmount() {
public componentWillUnmount() {
this.mounted = false;
const cli = MatrixClientPeg.get();
if (cli) {