From 1a82e856d967059435d315b3b6bb0540ca69742d Mon Sep 17 00:00:00 2001 From: Myrddin Dundragon Date: Fri, 10 Oct 2025 00:26:17 -0400 Subject: [PATCH] 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. --- Cargo.lock | 2 +- bard/Cargo.toml | 2 +- bard/src/components/list.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60241bd..c9b2651 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "bard" -version = "0.3.10" +version = "0.3.11" dependencies = [ "dioxus", "tavern", diff --git a/bard/Cargo.toml b/bard/Cargo.toml index 04e38af..7ae14ff 100644 --- a/bard/Cargo.toml +++ b/bard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bard" -version = "0.3.10" +version = "0.3.11" edition = "2024" description = "Dioxus components that will display a Tavern blogging system Blog." repository = "/CyberMages/tavern" diff --git a/bard/src/components/list.rs b/bard/src/components/list.rs index f861848..7471b06 100644 --- a/bard/src/components/list.rs +++ b/bard/src/components/list.rs @@ -80,13 +80,13 @@ pub fn BlogList(tags: Signal>, children: Element) -> Element // Retrieve the provided settings from context. let settings = use_context::(); - let list = use_server_future(move || + let list = use_resource(move || { let tags = tags(); let categories: Vec = tags.iter().cloned().collect(); async move { get_blog_list(categories).await } - })?; + }); rsx! {