1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-04 11:51:45 +03:00

Silence usages of componentWillReceiveProps

For https://github.com/vector-im/riot-web/issues/12877
This commit is contained in:
Travis Ralston
2020-04-01 14:35:39 -06:00
parent ab6bd4104f
commit 47e5cfecf2
28 changed files with 56 additions and 30 deletions

View File

@@ -123,7 +123,8 @@ export default class RightPanel extends React.Component {
this._unregisterGroupStore(this.props.groupId);
}
componentWillReceiveProps(newProps) {
// TODO: [REACT-WARNING] Replace with appropriate lifecycle event
UNSAFE_componentWillReceiveProps(newProps) {
if (newProps.groupId !== this.props.groupId) {
this._unregisterGroupStore(this.props.groupId);
this._initGroupStore(newProps.groupId);