Label and use UNSAFE_componentWillMount to minimize warnings

These TODO comments are expected to be fixed ASAP, but until that happens let's minimize the errors in the console for development.

For https://github.com/vector-im/riot-web/issues/12877

These all aren't using componentDidMount because they do something which causes application instability if componentDidMount were used. Much of these calls are expected to move into constructors once they are converted to real classes.
This commit is contained in:
Travis Ralston 2020-03-31 14:12:52 -06:00
parent 56dda3895c
commit 0a6f54da33
37 changed files with 58 additions and 22 deletions

View file

@ -238,6 +238,7 @@ export const TermsAuthEntry = createReactClass({
showContinue: PropTypes.bool,
},
// TODO: [REACT-WARNING] Move this to constructor
componentWillMount: function() {
// example stageParams:
//
@ -575,7 +576,8 @@ export const FallbackAuthEntry = createReactClass({
errorText: PropTypes.string,
},
componentWillMount: function() {
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
UNSAFE_componentWillMount: function() {
// we have to make the user click a button, as browsers will block
// the popup if we open it immediately.
this._popupWindow = null;