-
Notifications
You must be signed in to change notification settings - Fork 147
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
Routing breaks if a route component's root is a <Show>
for a rejected resource
#475
Comments
We throw errors on read with resources. We don't error on fetch. The mechanism similar to Suspense is based around whether or not we are able to render with what we have. So if there isn't an ErrorBoundary that is expected. |
Ah, I see that adding an Just to confirm:
Is that right? |
It doesn't right? I just added a div and it looks broken still to me. |
Ah, pardon my lack of specificity. When I alter the sandbox to wrap the But it sounds like it doesn't really matter either way? Since a Would it make sense for Solid to emit a console warning when reading resources without an |
Maybe.. but it doesn't really know that until you throw an error. We could do an additioanl context lookup at the time of read in dev or something I suppose. It is interesting what sort of ways we could indicate to the developer better patterns. |
Describe the bug
In the Stackblitz, a component uses
<Show>
to only show content once a resource has loaded. If that resource'sPromise
rejects, all routes cannot render anymore. Navigation will invoke a component function, but its body is never displayed.Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-eebkn9?file=src%2Findex.tsx
Steps to Reproduce the Bug or Issue
<Show when={thatResource()}>...
If the
<Show>
is wrapped in a<div>
, this issue does not reproduce.Expected behavior
I can still navigate to other routes like normal
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: