work on async demo

This commit is contained in:
Greg Johnston 2024-02-17 13:26:08 -05:00
parent 66e1e6d7a1
commit 44a0a0a93a
2 changed files with 6 additions and 11 deletions

View File

@ -30,16 +30,10 @@ pub fn async_example() -> impl IntoView {
let times = move || {
trigger.track();
async move {
view! {
{a2.await}
" and "
{b2.await}
}
}
.suspend()
.with_fallback("Loading...")
.track()
async move { (a2.await.to_string(), "test") } //{ (a2.await.to_string(), " and ", b2.await.to_string()) }
.suspend()
.with_fallback("Loading...")
.track()
};
let on_click = move |_| {
@ -64,7 +58,7 @@ pub fn async_example() -> impl IntoView {
</button>
<p>{move || count.get()}</p>
<p>
//{times}
{times}
</p>
}
}

View File

@ -21,6 +21,7 @@ use std::{
};
// any changes here should also be made in src/view/primitives.rs
// TODO should also apply to mapped signal read guards
macro_rules! render_primitive {
($($child_type:ty),* $(,)?) => {
$(