Flag componentWillUpdate as UNSAFE in MatrixChat
For https://github.com/vector-im/riot-web/issues/12877pull/21833/head
parent
0bb8973ee6
commit
ab6bd4104f
|
@ -360,7 +360,8 @@ export default createReactClass({
|
||||||
if (this._accountPasswordTimer !== null) clearTimeout(this._accountPasswordTimer);
|
if (this._accountPasswordTimer !== null) clearTimeout(this._accountPasswordTimer);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUpdate: function(props, state) {
|
// TODO: [REACT-WARNING] Replace with appropriate lifecycle stage
|
||||||
|
UNSAFE_componentWillUpdate: function(props, state) {
|
||||||
if (this.shouldTrackPageChange(this.state, state)) {
|
if (this.shouldTrackPageChange(this.state, state)) {
|
||||||
this.startPageChangeTimer();
|
this.startPageChangeTimer();
|
||||||
}
|
}
|
||||||
|
@ -381,7 +382,7 @@ export default createReactClass({
|
||||||
// Tor doesn't support performance
|
// Tor doesn't support performance
|
||||||
if (!performance || !performance.mark) return null;
|
if (!performance || !performance.mark) return null;
|
||||||
|
|
||||||
// This shouldn't happen because componentWillUpdate and componentDidUpdate
|
// This shouldn't happen because UNSAFE_componentWillUpdate and componentDidUpdate
|
||||||
// are used.
|
// are used.
|
||||||
if (this._pageChanging) {
|
if (this._pageChanging) {
|
||||||
console.warn('MatrixChat.startPageChangeTimer: timer already started');
|
console.warn('MatrixChat.startPageChangeTimer: timer already started');
|
||||||
|
|
Loading…
Reference in New Issue