fix signals in futures
This commit is contained in:
1 parent
a6f611eccf
commit
b3fbbba711
2 files changed
+12
-6
No files matched your search
+6
-6
@@ -33,12 +33,12 @@ struct ChildProps {
|
||||
fn Child(cx: Scope<ChildProps>) -> Element {
|
||||
let count = cx.props.count;
|
||||
|
||||
// use_future!(cx, || async move {
|
||||
// loop {
|
||||
// tokio::time::sleep(std::time::Duration::from_secs(count.value())).await;
|
||||
// *count.write() += 1;
|
||||
// }
|
||||
// });
|
||||
use_future!(cx, || async move {
|
||||
loop {
|
||||
tokio::time::sleep(std::time::Duration::from_secs(count.value())).await;
|
||||
*count.write() += 1;
|
||||
}
|
||||
});
|
||||
|
||||
render! {
|
||||
div {
|
||||
|
||||
Reference in new issue
Block a user