I'm using pagination and I need to add after page iteration new data to state.
Using context for storing my data.

**function for fetching data**

```
const fetchMissions = (dispatch) => async (page) => {
  const response = await fdApi.get('/mission', {
    params: { page, limit: 10 },
  });
  dispatch({ type: 'fetch_missions', payload: response.data });
};

```

**Reducer**

```
const missionReducer = (state, action) => {
  switch (action.type) {
    case 'add_error':
      return { ...state, errorMessage: action.payload };
    case 'fetch_missions':
      return action.payload
    default:
      return state;
  }
};

```

Problem is in reducer case 'fetch\_missions', no idea how to persist old data when fetching new page and add new data to same array

[Output from my server](https://i.stack.imgur.com/ianXj.png)