use_resource is the correct thing to use.

The top components can use_resource and be properly setup during
hydration. The sub components need to use_server_resource so that they
can be hydrated later.
This commit is contained in:
2025-10-10 00:26:17 -04:00
parent e49ecbac4d
commit 1a82e856d9
3 changed files with 4 additions and 4 deletions

View File

@ -80,13 +80,13 @@ pub fn BlogList(tags: Signal<HashSet<String>>, children: Element) -> Element
// Retrieve the provided settings from context.
let settings = use_context::<BardSettings>();
let list = use_server_future(move ||
let list = use_resource(move ||
{
let tags = tags();
let categories: Vec<String> = tags.iter().cloned().collect();
async move { get_blog_list(categories).await }
})?;
});
rsx!
{