Skip to content

Implement support for query pagination #8

@thomasdashney

Description

@thomasdashney

The library should support two forms of pagination (similar to react-query):

  • Discrete pages: react-query#usePaginatedQuery does 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 using dontReinitialize flag, so documentation could be added for this use case.
  • Load more / infinite loading: react-query#useInfiniteQuery
    • Caches an array of queries
    • Exposes fetchMore function, and canFetchMore/isFetchingMore status booleans
      requires user to define getFetchMore which provides additional arguments which are passed to the fetcher based on the previous query
    • Individually fetches each page in parallel if it becomes stale

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions