Migrate away from Legacy React Contexts
This commit is contained in:
parent
2e8d66fa36
commit
937b32663c
55 changed files with 651 additions and 750 deletions
|
@ -30,6 +30,7 @@ import PropTypes from 'prop-types';
|
|||
import { _t } from '../../languageHandler';
|
||||
import { instanceForInstanceId, protocolNameForInstanceId } from '../../utils/DirectoryUtils';
|
||||
import Analytics from '../../Analytics';
|
||||
import MatrixClientContext from "../../contexts/MatrixClientContext";
|
||||
|
||||
const MAX_NAME_LENGTH = 80;
|
||||
const MAX_TOPIC_LENGTH = 160;
|
||||
|
@ -65,16 +66,6 @@ module.exports = createReactClass({
|
|||
};
|
||||
},
|
||||
|
||||
childContextTypes: {
|
||||
matrixClient: PropTypes.object,
|
||||
},
|
||||
|
||||
getChildContext: function() {
|
||||
return {
|
||||
matrixClient: MatrixClientPeg.get(),
|
||||
};
|
||||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
this._unmounted = false;
|
||||
this.nextBatch = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue