This commit is contained in:
or-else
2023-05-10 13:20:40 -07:00
parent c15092e850
commit 852a1a7c4e
11 changed files with 14 additions and 43 deletions
-12
View File
@@ -209,18 +209,6 @@ class MessagesView extends React.Component {
}
componentDidUpdate(prevProps, prevState) {
const p = [];
const s = [];
Object.entries(this.props).forEach(([key, val]) =>
prevProps[key] !== val && p.push(key)
);
if (this.state) {
Object.entries(this.state).forEach(([key, val]) =>
prevState[key] !== val && s.push(key)
);
}
console.log(`Prop '${p}', state '${s}' changed`);
// Scroll last message into view on component update e.g. on message received
// or vertical shrinking.
if (this.messagesScroller &&