Last active
April 11, 2016 16:48
-
-
Save tmontoya-ias/f3dc20e8b090b14b7c3c687afee8efc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Immutable from 'immutable'; | |
import {CLIENTS_FIND} from './constants'; | |
const initialState = Immutable.Map({ | |
status: "processed", | |
keyword: "reducer", | |
responseClients: [] | |
}); | |
export default (state = initialState, action) => { | |
switch (action.type) { | |
case CLIENTS_FIND: | |
const response = action.payload.data; | |
return state.withMutations(map => { | |
map | |
.set('status', 'processed') | |
.set('responseClients', response.listClients); | |
}) | |
break; | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment