UNPKG

create-nova-expo-template

Version:

A template for creating a new React Native app using Expo and TypeScript, with a focus on performance and best practices.

18 lines (15 loc) 459 B
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable consistent-return */ /* eslint-disable no-param-reassign */ const infintyPaginationMergeHandler = (currentCache: any, newItems: any) => { if (!newItems?.previous) { return { ...newItems, }; } if (currentCache?.next) { currentCache.next = newItems?.next; currentCache.results.push(...newItems.results); } }; export default infintyPaginationMergeHandler;