fix tests

This commit is contained in:
Evan Almloff committed 2023-06-30 12:56:22 -07:00
1 parent 60b25e9c2f
commit a6e87cf340
3 files changed
+3 -6

No files matched your search

+1
View File
@@ -21,3 +21,4 @@ log = { workspace = true }
futures-util = { workspace = true, default-features = false }
dioxus-core = { workspace = true }
dioxus = { workspace = true }
web-sys = { version = "0.3.64", features = ["Document", "Window", "Element"] }
+1 -1
View File
@@ -22,7 +22,7 @@ macro_rules! to_owned {
}
mod use_on_unmount;
pub use use_on_unmount;
pub use use_on_unmount::*;
mod usecontext;
pub use usecontext::*;
+1 -5
View File
@@ -4,10 +4,6 @@
/// ```rust
/// use dioxus::prelude::*;
/// fn main() {
/// dioxus_web::launch(app)
/// }
/// fn app(cx: Scope) -> Element {
/// let state = use_state(cx, || true);
/// render! {
@@ -60,7 +56,7 @@
/// }
/// }
/// ```
pub fn use_on_unmount<C: FnOnce() + 'static, D: FnOnce() + 'static>(cx: &ScopeState, destroy: D) {
pub fn use_on_unmount<D: FnOnce() + 'static>(cx: &dioxus_core::ScopeState, destroy: D) {
cx.use_hook(|| LifeCycle {
ondestroy: Some(destroy),
});