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

usePaginatedQuery and Suspense #503

Closed
typeofweb opened this issue May 20, 2020 · 0 comments
Closed

usePaginatedQuery and Suspense #503

typeofweb opened this issue May 20, 2020 · 0 comments

Comments

@typeofweb
Copy link

typeofweb commented May 20, 2020

According to the docs, when using usePaginatedQuery with suspense: true only the initial load should actually "suspend":

  • suspense: Boolean
    • Optional
    • Set this to true to enable suspense mode.
    • When true, useQuery will suspend when status === 'loading'
    • When true, useQuery will throw runtime errors when status === 'error'

Unfortunately, it seems it's not the case and rendering is suspended also when trying to fetch consecutive pages.

I created a codesandbox for demo purposes: https://codesandbox.io/s/flamboyant-surf-eioh6?file=/src/Todos.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants