From react-redux official docs:
When an action is dispatched, useSelector() will do a reference comparison of the previous selector result value and the current result value. If they are different, the component will be forced to re-render. If they are the same, the component will not re-render.
If I did something like this:
Redux state
state = {
groupAB: {
propA: valueA,
propB: valueB
},
propC,
// ETC
}
SomeComponent.tsx
const propA = useSelector((state) => state.groupAB.propA);
How would this component behave if: the groupAB object changes its reference (because propB has mutated) but propA: valueA remains the same?
What I expect:
The component should not re-render even if groupAB changes, because what the useSelector() cares about is the return, which is valueA, in this example. Am I right?

