redux-optimist dependency causes wasteful mapStateToProps invocations #4593
Labels
Framework
Issues related to broader framework topics, especially as it relates to javascript
[Type] Performance
Related to performance efforts
This past summer I had reported an issue at ForbesLindesay/redux-optimist#22 . In reviewing the behavior of
react-redux
recently, I found that it is smart enough to avoid calling each connected components'mapStateToProps
if the reference for state does not change after a dispatched action. This should ideally occur if a dispatched action causes no change in state value. However, withredux-optimist
, whether or not a change occurs, a new object reference will be returned upon a dispatch, therefore causingmapStateToProps
for every single connected component to be invoked.We should either move away from
redux-optimist
, or submit an upstream patch, as given the lack of response on ForbesLindesay/redux-optimist#22 since June, it is unlikely to be otherwise resolved.The text was updated successfully, but these errors were encountered: