Text dependencies

This commit is contained in:
2026-02-01 10:11:41 +01:00
parent 0cead353ee
commit b23c8c68dc
3 changed files with 45 additions and 11 deletions
+11 -1
View File
@@ -8,7 +8,17 @@ pub fn main() {
#[component]
fn App(cx: &Arc<Context>) -> View {
rsx! {
"Hello World"
Card { content: "Hello World".to_string() }
}
.view(&cx)
}
#[component]
fn Card(cx: &Arc<Context>, content: String) -> View {
let content = content.clone();
rsx! {
%ref content "----\n{content}\n----"
}
.view(&cx)
}