fix setState bug by renaming componentDidUnmount to componentWillUnmount

This commit is contained in:
Tim Daubenschütz 2015-06-04 13:17:59 +02:00
parent ccbf411168
commit c19a05ca50
6 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ let AccordionListItemTableEditions = React.createClass({
EditionListStore.listen(this.onChange);
},
componentDidUnmount() {
componentWillUnmount() {
EditionListStore.unlisten(this.onChange);
},

View File

@ -31,7 +31,7 @@ let PieceListBulkModal = React.createClass({
UserStore.listen(this.onChange);
},
componentDidUnmount() {
componentWillUnmount() {
EditionListStore.unlisten(this.onChange);
UserStore.unlisten(this.onChange);
},

View File

@ -22,7 +22,7 @@ let PieceListToolbar = React.createClass({
PieceListStore.listen(this.onChange);
},
componentDidUnmount() {
componentWillUnmount() {
PieceListStore.unlisten(this.onChange);
},

View File

@ -29,7 +29,7 @@ let EditionContainer = React.createClass({
UserActions.fetchCurrentUser();
EditionActions.fetchOne(this.props.params.editionId);
},
componentDidUnmount() {
componentWillUnmount() {
EditionStore.unlisten(this.onChange);
UserStore.unlisten(this.onChange);
},

View File

@ -26,7 +26,7 @@ let Header = React.createClass({
UserActions.fetchCurrentUser();
},
componentDidUnmount() {
componentWillUnmount() {
UserStore.unlisten(this.onChange);
},

View File

@ -26,7 +26,7 @@ let PieceList = React.createClass({
PieceListActions.fetchPieceList(page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc);
},
componentDidUnmount() {
componentWillUnmount() {
PieceListStore.unlisten(this.onChange);
},