work on async demo
This commit is contained in:
parent
66e1e6d7a1
commit
44a0a0a93a
|
@ -30,16 +30,10 @@ pub fn async_example() -> impl IntoView {
|
||||||
|
|
||||||
let times = move || {
|
let times = move || {
|
||||||
trigger.track();
|
trigger.track();
|
||||||
async move {
|
async move { (a2.await.to_string(), "test") } //{ (a2.await.to_string(), " and ", b2.await.to_string()) }
|
||||||
view! {
|
.suspend()
|
||||||
{a2.await}
|
.with_fallback("Loading...")
|
||||||
" and "
|
.track()
|
||||||
{b2.await}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.suspend()
|
|
||||||
.with_fallback("Loading...")
|
|
||||||
.track()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let on_click = move |_| {
|
let on_click = move |_| {
|
||||||
|
@ -64,7 +58,7 @@ pub fn async_example() -> impl IntoView {
|
||||||
</button>
|
</button>
|
||||||
<p>{move || count.get()}</p>
|
<p>{move || count.get()}</p>
|
||||||
<p>
|
<p>
|
||||||
//{times}
|
{times}
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
// any changes here should also be made in src/view/primitives.rs
|
// 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 {
|
macro_rules! render_primitive {
|
||||||
($($child_type:ty),* $(,)?) => {
|
($($child_type:ty),* $(,)?) => {
|
||||||
$(
|
$(
|
||||||
|
|
Loading…
Reference in New Issue