Skip to content

Commit

Permalink
do not restart subscription on every prop change
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjade committed Aug 30, 2017
1 parent 1e9f1c0 commit bd87f23
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/client/modules/counter/containers/counter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ class Counter extends React.Component {

componentWillReceiveProps(nextProps) {
if (!nextProps.loading) {
if (this.subscription) {
this.subscription();
this.subscription = null;
}

// Subscribe or re-subscribe
if (!this.subscription) {
this.subscribeToCount();
Expand Down

0 comments on commit bd87f23

Please sign in to comment.