You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build it and play with it with devtools console opened. You should see following errors:
Uncaught TypeError: Cannot read property 'foo' of undefined
This happens because the mapStateToProps of the Item component is called with component props based on the previous store state. The two states are not compatible anymore and it causes all kinds of errors.
I think the parent should render and update the props for the Item component before the mapStateToProps of the Item component can be executed.