Skip to content

Instantly share code, notes, and snippets.

@ColadaFF
Forked from wsalazar-ias/Case
Created April 13, 2016 23:59
Show Gist options
  • Save ColadaFF/c947981b36f09b641e3ee107409fbf7d to your computer and use it in GitHub Desktop.
Save ColadaFF/c947981b36f09b641e3ee107409fbf7d to your computer and use it in GitHub Desktop.
switch (action.type) {
case CLIENTS_FIND:
const response = action.payload.data;
return state.withMutations(map => {
map
.set('status', 'processed')
.set('keyword', response.keyword)
.set('countClients', response.countClients)
.set('responseClients', JSON.parse(response.listClients));
})
break;
case CHANGE_PAGE:
return state.set('page', action.currentPage);
break;
case CHANGE_KEYWORD:
return state.set('keyword', action.keyword);
break;
default:
return state;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment