From aa52bb339a6016e8ed7833b9abaa4e0abb7f2351 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 24 Aug 2018 16:55:53 +0300 Subject: initial reload fix --- vnext/src/components/Feeds.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vnext/src/components') diff --git a/vnext/src/components/Feeds.js b/vnext/src/components/Feeds.js index 11466d23..89eb7774 100644 --- a/vnext/src/components/Feeds.js +++ b/vnext/src/components/Feeds.js @@ -72,6 +72,12 @@ class Feed extends React.Component { componentDidMount() { this.loadMessages(this.props.visitor.hash, this.props.location.search); } + + shouldComponentUpdate(nextProps, nextState) { + return this.props.visitor.uid !== nextProps.visitor.uid + || this.state !== nextState || this.props.location !== nextProps.location; + } + getSnapshotBeforeUpdate(prevProps) { return (this.props.location.search != prevProps.location.search || this.props.visitor != prevProps.visitor || this.props.query.search != prevProps.query.search); -- cgit v1.2.3