wip: docs
This commit is contained in:
1 parent
52c7154897
commit
8814977eee
14 files changed
+335
-384
No files matched your search
@@ -173,6 +173,6 @@ pub fn use_provide_state<'a, T: 'static>(cx: Context<'a>, f: impl FnOnce() -> T)
|
||||
});
|
||||
cx.provide_state(state)
|
||||
},
|
||||
|inner| {},
|
||||
|_inner| {},
|
||||
)
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
use dioxus_core::Context;
|
||||
use futures::Future;
|
||||
use std::{
|
||||
borrow::Borrow,
|
||||
cell::{Cell, RefCell},
|
||||
pin::Pin,
|
||||
rc::Rc,
|
||||
@@ -42,7 +41,7 @@ pub fn use_coroutine<'a, F: Future<Output = ()> + 'a>(
|
||||
} else {
|
||||
// make sure to drop the old future
|
||||
if let Some(fut) = state.fut.borrow_mut().take() {
|
||||
//
|
||||
drop(fut);
|
||||
}
|
||||
}
|
||||
CoroutineHandle { cx, inner: state }
|
||||
|
||||
Reference in new issue
Block a user