-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
The library should support two forms of pagination (similar to react-query):
- Discrete pages:
react-query#usePaginatedQuerydoes not reinitialize data so you can keep viewing the previous page https://github.com/tannerlinsley/react-query#paginated-queries-with-usepaginatedquery. This could be achieved usingdontReinitializeflag, so documentation could be added for this use case. - Load more / infinite loading:
react-query#useInfiniteQuery- Caches an array of queries
- Exposes
fetchMorefunction, andcanFetchMore/isFetchingMorestatus booleans
requires user to definegetFetchMorewhich provides additional arguments which are passed to the fetcher based on the previous query - Individually fetches each page in parallel if it becomes stale