chore: Clean up use_on_destroy docs (#2199)

* chore: Clean up `use_on_destroy` docs

* fmt
This commit is contained in:
Marc Espin authored and GitHub committed 2024-04-01 09:20:04 -05:00
1 parent 57e05dcf3a
commit 7949fcda9a
3 files changed
+1 -35

No files matched your search

+1 -5
View File
@@ -1,10 +1,6 @@
use dioxus_core::prelude::use_drop;
#[deprecated(
note = "Use `use_on_destroy` instead, which has the same functionality. \
This is deprecated because of the introduction of `use_on_create` which is better mirrored by `use_on_destroy`. \
The reason why `use_on_create` is not `use_on_mount` is because of potential confusion with `dioxus::events::onmounted`."
)]
#[deprecated(note = "Use `use_drop` instead, which has the same functionality.")]
pub fn use_on_unmount<D: FnOnce() + 'static>(destroy: D) {
use_drop(destroy);
}