From 672540023769845d6d162b382d518945321956ab Mon Sep 17 00:00:00 2001 From: Filipp Riabchun Date: Mon, 14 Oct 2019 18:30:20 +0200 Subject: [PATCH] Remove unused `latestStoreState` field (#1426) * Remove unused `latestStoreState` field 1. This field doesn't actually affect anything: `action.payload` is always a fresh object anyway 2. Having reference to some arbitrary state from the past (namely, the one that triggered the last update for given component) leads to huge memory leaks if the state object is large and there are lots of connected components. * Revert redundant change --- src/components/connectAdvanced.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/connectAdvanced.js b/src/components/connectAdvanced.js index e3e6f1da4..cafa0baa3 100644 --- a/src/components/connectAdvanced.js +++ b/src/components/connectAdvanced.js @@ -350,7 +350,6 @@ export default function connectAdvanced( forceComponentUpdateDispatch({ type: 'STORE_UPDATED', payload: { - latestStoreState, error } })