Move getInitialState
before componentWillMount
This commit is contained in:
parent
3cb128094d
commit
2cb4c897ce
1 changed files with 6 additions and 6 deletions
|
@ -42,6 +42,12 @@ export default React.createClass({
|
||||||
matrixClient: React.PropTypes.instanceOf(MatrixClient).isRequired,
|
matrixClient: React.PropTypes.instanceOf(MatrixClient).isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInitialState() {
|
||||||
|
return {
|
||||||
|
hover: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this.unmounted = false;
|
this.unmounted = false;
|
||||||
if (this.props.tag[0] === '+') {
|
if (this.props.tag[0] === '+') {
|
||||||
|
@ -59,12 +65,6 @@ export default React.createClass({
|
||||||
this.unmounted = true;
|
this.unmounted = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
|
||||||
return {
|
|
||||||
hover: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
onClick: function(e) {
|
onClick: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue