Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for query pagination #8

Open
thomasdashney opened this issue Mar 1, 2020 · 0 comments
Open

Implement support for query pagination #8

thomasdashney opened this issue Mar 1, 2020 · 0 comments

Comments

@thomasdashney
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development
  
To do
Development

No branches or pull requests

1 participant