From eb702dce454f52ca48842452dfbb7e0af77cc307 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sun, 25 Jan 2026 20:40:24 +0100 Subject: [PATCH] RSX dependency --- examples/hello_world.rs | 6 +++--- src/macros.rs | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/hello_world.rs b/examples/hello_world.rs index c379a2c..2c877d7 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -48,9 +48,9 @@ fn app(cx: &Arc) -> View { } } - // for %count, mount as _, (i in 0..count.get_dl()) { - // "{i}" - // } + for %count, mount as _, (i in 0..count.get_dl()) { + "{i}" + } } .view(cx.clone()) } diff --git a/src/macros.rs b/src/macros.rs index a87d1b1..b1b1a57 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -17,6 +17,8 @@ macro_rules! rsx { macro_rules! rsx_scope { ($rsx:expr, for $(%$($dep:ident $(as $dp:pat,)?),+)? ($p:pat in $v:expr) {$($inner:tt)*} $($rest:tt)*) => { { + $($($crate::rsx_dep!($dep);)+)? + $rsx.dynamic_scope({ $($($crate::rsx_dep!($dep $(as $dp)?);)+)? move |scope| { @@ -32,6 +34,8 @@ macro_rules! rsx_scope { ($rsx:expr, if $(%$($dep:ident $(as $dp:pat,)?),+)? ($st:expr) {$($inner:tt)*} $($rest:tt)*) => { { + $($($crate::rsx_dep!($dep);)+)? + $rsx.dynamic_scope({ $($($crate::rsx_dep!($dep $(as $dp)?);)+)? move |scope| {