You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Basically if an initial page render renders a suspense with an err, the error boundary fallback is rendered. However if through signals the resource that is suspended succeeds on a refetch the success case is not rendered. This is fixed if one more transition to err and then back to ok is performed. This might make more sense by just following the reproduction instructions.
Leptos Dependencies
leptos = { version = "0.6", features = ["nightly"] }
leptos_axum = { version = "0.6", optional = true }
leptos_meta = { version = "0.6", features = ["nightly"] }
leptos_router = { version = "0.6", features = ["nightly"] }
Input 4 into the text box that will update the query signal and refetch the resource
Nothing will be rendered at first
Input 6 to render the Error case again
Input 4 and the Ok case will finally be rendered
Expected behavior
If an initial page load renders the fallback of an error boundary, if a signal refetches the resources into an ok, the ok branch should be rendered immediately.
Screenshots
If applicable, add screenshots to help explain your problem.
N/A hopefully but happy to provide if needed
Additional context
This uses a server fn as the resource fetcher, to mirror my actual use case. However I can reproduce the bug without it being a server fn.
The text was updated successfully, but these errors were encountered:
I can reproduce this, and it seems to be an issue with the Suspense not tracking the resource correctly if it's in the fallback branch of the ErrorBoundary.
Adding a simple .track() for the resource outside the ErrorBoundary resolves the issue (and causes some warnings that are not a problem)
Describe the bug
Basically if an initial page render renders a suspense with an err, the error boundary fallback is rendered. However if through signals the resource that is suspended succeeds on a refetch the success case is not rendered. This is fixed if one more transition to err and then back to ok is performed. This might make more sense by just following the reproduction instructions.
Leptos Dependencies
To Reproduce
Steps to reproduce the behavior:
Using the fallible resource branch of my min repro repo
Expected behavior
If an initial page load renders the fallback of an error boundary, if a signal refetches the resources into an ok, the ok branch should be rendered immediately.
Screenshots
If applicable, add screenshots to help explain your problem.
N/A hopefully but happy to provide if needed
Additional context
This uses a server fn as the resource fetcher, to mirror my actual use case. However I can reproduce the bug without it being a server fn.
The text was updated successfully, but these errors were encountered: