Question 1 / 1
A developer creates a ColorCount container:
const mapStateToProps = state => ({
count: state.colors.length
})
export const ColorCount = connect(mapStateToProps)(({ count }) => (
<p>{count} colors</p>
))
After dispatching SORT_COLORS (which only changes state.sort, not state.colors), the developer expects ColorCount to skip re-rendering since count didn't change. They add a console.log and confirm no extra re-render occurs. A teammate insists this must be a bug and that ColorCount should re-render whenever any state changes. Who is correct, and why?