-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
rexecuteQuery
escapes Suspense boundary
#1180
Comments
My first thought here is that I don't think it's possible for us to prevent this from happening as this behaviour is a side-effect that can only be driven into triggering the Suspense boundary if it re-renders. However to re-render the function would have to alter some state to trigger React to update. We'd only want that to happen once though, but we can't control this to be a guarantee to happen only once, as React doesn't make this guarantee itself anymore. So long story short, I believe the two patterns — Suspense and What we could do is force |
That sounds to me like how it should behave. I would expect we would need to handle |
Suspense without |
@StevenLangbroek I do think you'd have to handle it; However, it would mean that the previous content would stay mounted, which actually is rather nice as far as loading behaviour goes, since that means if it's not handled, the content still doesn't break. |
Yep agree! |
Hey folks, found a little issue with suspense:
urql version & exchanges:
Steps to reproduce
Expected behavior
Refetching a query should trigger the suspense boundary
Actual behavior
Refetching a query completely bypasses Suspense and leads to an uncaught "exception" (the promise that should be suspended on) 🤷
The text was updated successfully, but these errors were encountered: