Open luxalpa opened 2 months ago
Hm. This one does seem to be fixed by https://github.com/leptos-rs/leptos/pull/2284, which I closed because I thought it broke other things. It may be worth testing your full example against that branch to see if it does break other things. I can revisit it.
The current Suspense system is very fragile and is one of the things that is definitely being improved in 0.7 wheni it comes. Sorry for the pain for now.
Yes, the change does resolve this issue. I'll see if it breaks any further things but it does look pretty good right now. Definitely excited for 0.7 but also a bit scared of all the things that it might be breaking :X
Describe the bug When using a Suspense within another Suspense with PartiallyBlocked SSR mode and two blocking resources, it will only block for the outer one, but not wait for the inner one. Furthermore, a component (possibly others) that renders after the Suspense won't hydrate properly and instead create
<DynChild>
and<>
comment nodes.Leptos Dependencies
Please copy and paste the Leptos dependencies and features from your
Cargo.toml
.For example:
To Reproduce
Expected behavior Render the entire HTML first instead of rendering it later. Properly hydrate the created components
Additional context My outer suspense / resource is loading UserData depending on whether the user is logged in or not. Then the inner suspense / resource is loading some application data that is only allowed to be loaded if the user is logged in. Unfortunately it seems that I cannot avoid nesting Suspense's here, as I can't load all possible userdata on the outer context, and if I load only the data necessary for the current page, then it won't work if the user starts on a different page but then navigates to this one. I have a large app and several pages have this issue, so any hacky workaround will also involve tons of work.