import { handleActions } from 'redux-actions' ; import * as Actions from '../constants/actions' ; import { Avatar } from '../definitions' ; import { AvatarsState } from './index' ; const initialState = [ ] ; export default handleActions < AvatarsState , any > ( { [ Actions . FETCHED_AVATARS ] : ( state , action ) => { return [ ... state , ... action . payload ] ; } , } , initialState ) ;