Skip to content

Commit

Permalink
Remove unused latestStoreState field (reduxjs#1426)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Hypnosphi authored and timdorr committed Oct 14, 2019
1 parent 66dbad3 commit baa6e56
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/connectAdvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ export default function connectAdvanced(
forceComponentUpdateDispatch({
type: 'STORE_UPDATED',
payload: {
latestStoreState,
error
}
})
Expand Down

0 comments on commit baa6e56

Please sign in to comment.