title: Need to append data in the array in reducer of redux
body: <p>I am doing pagination where i will be getting data for each page click.I want to append the data with the previous values.Here is my current code.Have no idea to do it.</p>
  
  <pre><code>const InitialProjects={
      projectList:[],
      error:null,
      loading:false
  }
  
  export const projects=(state=InitialProjects,action)=&gt;{
      switch(action.type){
          case ActionTypes.FETCH_PROJECTS:
              return Object.assign({},state,{
                  projectList:[],error:null,loading:true
              })
          case ActionTypes.FETCH_PROJECTS_SUCCESS:
              return {
                  projectList:action.payload
  
              }
          case ActionTypes.FETCH_PROJECTS_FAILURE:
              return Object.assign({},state,{
                  projectList:["not-found"],error:action.payload.message||action.payload.status,loading:false
              })
          default:
              return state;
      }
  }
  </code></pre>
  
  <p>My first response will look something like this </p>
  
  <pre><code>[
  {
    Id:0,
  Name:india
  },
  {
  Id:1,
  Name:bang
  },
  {
  Id:3,
  Name:us
  },
  {
   Id:5,
  Name:uk
  }
  ]
  </code></pre>
  
  <p>second response will be like this </p>
  
  <pre><code>   [
      {
        Id:8,
      Name:india
      },
      {
      Id:12,
      Name:bang
      },
      {
      Id:19,
      Name:us
      },
      {
       Id:35,
      Name:uk
      }
      ]
  </code></pre>
  
  <p>Please do note that the id field might not be consecutive.
  I want something like this in my redux </p>
  
  <pre><code>projectList:
  0(pin): {Id:1,Name:'dewd'}
  1(pin): {Id:2,Name:'tyytg'}
  2(pin): {Id:5,Name:'xsx'}
  3(pin): {Id:4,Name:'tyyt'}
  4(pin): {Id:10,Name:'xsx'}
  5(pin): {Id:17,Name:'xsx'}
  </code></pre>
  
  <p>Appreciate any help.Thanks</p>