Move `getInitialState` before `componentWillMount`

pull/21833/head
lukebarnard 2018-01-02 13:45:19 +00:00
parent 3cb128094d
commit 2cb4c897ce
1 changed files with 6 additions and 6 deletions

View File

@ -42,6 +42,12 @@ export default React.createClass({
matrixClient: React.PropTypes.instanceOf(MatrixClient).isRequired,
},
getInitialState() {
return {
hover: false,
};
},
componentWillMount() {
this.unmounted = false;
if (this.props.tag[0] === '+') {
@ -59,12 +65,6 @@ export default React.createClass({
this.unmounted = true;
},
getInitialState() {
return {
hover: false,
};
},
onClick: function(e) {
e.preventDefault();
e.stopPropagation();