Assumption:
- A component that appears on a page multiple times
- The component use
ReactRedux.connect and reselect to select data based on state and component.props
Problem:
If the page have two or more component instances and their props are different, the memoize function (which has cache size = 1) will always cache miss.
This is because the memoize function is shared amongst all component instance, thus, component with different props will always invalidate each other.
Solution:
There are multiple solutions to this issue. I think memoize cache should bound to the component instance.