fix: really big bug around hooks
This commit is contained in:
1 parent
36d89beb34
commit
52c7154897
22 files changed
+413
-342
No files matched your search
@@ -11,14 +11,16 @@ use dioxus_hooks::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
fn main() {
|
||||
simple_logger::init().unwrap();
|
||||
dioxus_desktop::launch(App, |c| c);
|
||||
}
|
||||
|
||||
static App: FC<()> = |cx, props| {
|
||||
let mut count = use_state(cx, || 0);
|
||||
log::debug!("count is {:?}", count);
|
||||
|
||||
cx.push_task(|| async move {
|
||||
tokio::time::sleep(Duration::from_millis(100)).await;
|
||||
tokio::time::sleep(Duration::from_millis(1000)).await;
|
||||
count += 1;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user