samples/simple-example/src/store/reducer.js
function handlePeopleRetrieved(state, action) {
  if (action.error) {
    return {
      ...state,
      people: null,
      error: getErrorDescription(action.payload)
    };
  }

  return {
    ...state,
    people: action.payload,
    error: null
  };
}
function handlePeopleRetrieved(state, action) {
  if (action.error) {
    return {
      ...state,
      people: null,
      error: getErrorDescription(action.payload)
    };
  }

  return {
    ...state,
    people: action.payload,
    error: null
  };
}
function handlePeopleRetrieved ( state , action ) { if ( action . error ) { return { ... state , people : null , error : getErrorDescription ( action . payload ) } ; } return { ... state , people : action . payload , error : null } ; }
Handling the response of the REST Action.
Handling the response of the REST Action .