I have a hook, if I scroll down it will call for new data as like infinite scroll, but when I scroll down it calls the API for new data but it is removing the previous data. I want to concat with previous data. I think it is possible by the select method of react query but how can I get the previous data

```
const useActivityFeedData = (
  activityFeedPageIndex: number,
  pageSize = Config.defaultPageSize,
) =>
  useQuery(
    [ACTIVITY_FEED, activityFeedPageIndex],
    () => Api.user.getActivityFeedData(activityFeedPageIndex, pageSize),
    {
      initialData: {
        activityList: [],
      },
      keepPreviousData: true,
      select: (res: any) => ({
        activityList: res.activityList,
      }),
    },
  );

```