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 /* ??? */;
}
}