From 2c5c218fd1480de00556e1538a7acee4865f07e1 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Thu, 25 Apr 2019 00:05:33 +0200 Subject: [PATCH] Remove unsubscription since component would unount when node changes --- app/src/components/Tree/TreeNode.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/components/Tree/TreeNode.tsx b/app/src/components/Tree/TreeNode.tsx index 30a1cf7..763984c 100644 --- a/app/src/components/Tree/TreeNode.tsx +++ b/app/src/components/Tree/TreeNode.tsx @@ -173,13 +173,6 @@ class TreeNodeComponent extends React.Component { this.addSubscriber(treeNode) } - public componentWillReceiveProps(nextProps: Props) { - if (nextProps.treeNode !== this.props.treeNode) { - this.removeSubscriber(this.props.treeNode) - this.addSubscriber(nextProps.treeNode) - } - } - public componentWillUnmount() { const { treeNode } = this.props this.removeSubscriber(treeNode)