According to this answer, react redux shallow compares the output of mapStateToProps
to figure out whether or not a component needs to be re-rendered..
I have a component which is not re-rendering despite a change in the relevant state.
I attached breakpoints to the shallowEqual function in the react redux source code but found out that the function, in fact, returns false(i.e the objects being compared in case of my component are not equal).So ideally my component should re-render. I am thus unable to figure out why my component is not re-rendering. I'm guessing it's because of the performance optimizations in the connect
function.
Is there any way to print the outputs of the checks being made in the connect function regarding the re-rendering of a component