Make use_callback and Callback bring the runtime with them (#2852)

* Move the runtime along with Callback
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-08-20 14:58:53 -07:00
1 parent 5a7a91323a
commit effc0a3b94
6 files changed
+105 -139

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
#![allow(missing_docs)]
use crate::{use_callback, use_hook_did_run, use_signal, UseCallback};
use crate::{use_callback, use_hook_did_run, use_signal};
use dioxus_core::prelude::*;
use dioxus_signals::*;
use std::future::Future;
@@ -82,7 +82,7 @@ where
pub struct UseFuture {
task: CopyValue<Task>,
state: Signal<UseFutureState>,
callback: UseCallback<(), Task>,
callback: Callback<(), Task>,
}
/// A signal that represents the state of a future