Move `getInitialState` before `componentWillMount`
parent
3cb128094d
commit
2cb4c897ce
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue