Skip to content

Commit

Permalink
Use forceUpdate instead of this.setState(this.state) in PostRecommend…
Browse files Browse the repository at this point in the history
…ation (busyorg#919)
  • Loading branch information
jm90m authored Oct 28, 2017
1 parent eba703a commit 34c0b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Sidebar/PostRecommendation.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ class PostRecommendation extends Component {
if (author !== this.state.currentAuthor) {
this.getPostsByAuthor(author);
} else {
this.setState(this.state);
this.forceUpdate();
}
};

navigateToPostComments = () => {
document.getElementById('comments').scrollIntoView();
this.setState(this.state);
this.forceUpdate();
};

renderPosts = () => {
Expand Down

0 comments on commit 34c0b44

Please sign in to comment.