Use componentDidMount in place of componentWillMount where possible

This fixes a common React warning we see. Most of these components should be using constructors instead, however componentDidMount is just as good (and doesn't require converting most of these).

Conversion to classes will be done in a later stage of React warning fixes.

For https://github.com/vector-im/riot-web/issues/12877
This commit is contained in:
Travis Ralston 2020-03-31 14:14:17 -06:00
parent 56dda3895c
commit 3f99332f4b
70 changed files with 74 additions and 91 deletions

View file

@ -113,7 +113,7 @@ export default createReactClass({
};
},
componentWillMount: function() {
componentDidMount: function() {
this._unmounted = false;
// map from login step type to a function which will render a control