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

Have fetch example conform to docs guidance around using <ErrorBoundary> and <Transition> in conjunction #2035

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

MoonKraken
Copy link
Contributor

The docs state that when used in conjunction, <ErrorBoundary> should be inside <Transition>, not the other way around. This didn't have a functional effect on the fetch example because it happens to use create_local_resource which guarantees that the resource will be loaded on the client side. https://docs.rs/leptos/latest/leptos/fn.ErrorBoundary.html#interaction-with-suspense

But I was working on an application that uses create_resource, and I happened to be using this example as a model of using <ErrorBoundary> and <Transition> in conjunction. When server side rendering is a possibility, reversing them seems to cause an issue where the <ErrorBoundary> fallback doesn't render properly.

So I thought maybe we should use them in the recommended order in this example.

@gbj
Copy link
Collaborator

gbj commented Nov 17, 2023

Thanks! That makes sense to me, for sure.

@gbj gbj merged commit 4518d3c into leptos-rs:main Nov 18, 2023
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants