Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactuseReducerSingle-choice MCQ

A reducer-based store re-renders too often. You want a dispatch to be a no-op when nothing actually changes. Which approach makes React skip the re-render?

function reducer(state, action) { switch (action.type) { case 'setName': // action.name may equal state.name return /* ??? */; } }