title: Redux add object to array
body: <p>I have the following problem...</p>
  
  <p>I want to add an object to an array of objects using redux in my react-native application.
  I get this error message:</p>
  
  <p>Invalid attempt to spread non-iterable instance</p>
  
  <pre><code>
  // my action
  
  export function newTaskAction(){
    return{
      type: ADD_NEW_TASK,
      payload: {
        new: { id: '5', task:'test123'}
      }
    }
  }
  
  
  
  //my reducer
  
  export default function taskReducer(state = initialUserState, action){
      switch (action.type)
      {
          case ADD_NEW_TASK :
              return {
                  ...state,
                  tasks: [...state.tasks, payload.new]
              }
          default:
              return state
      }
  
  
  
  
  const store = createStore(allReducers, {
   tasks: [
     {id: "1", task: "React Native lernen"},
     {id: "2", task: "Redux lernen"},
     {id: "3", task: "Etwas lesen"},
     {id: "4", task: "Einkaufen gehen"}
   ],
   user: 'Frank'
  });
  </code></pre>