Add use_on_mount and fix some typos (#1497)

* Add `use_on_mount` and fix some typos

* Optimize away UseOnMount struct

* `use_on_mount`, `use_on_unmount` -> `use_on_create`, `use_on_destroy`

* Make `use_on_unmount` deprecated

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
LeonardandEvan Almloff authored and GitHub committed 2023-10-04 08:23:21 -05:00
1 parent 9f7a0a9f63
commit 30a3283438
4 files changed
+58 -13

No files matched your search

+5 -3
View File
@@ -1,7 +1,7 @@
#![cfg_attr(feature = "nightly-features", feature(debug_refcell))]
#[macro_export]
/// A helper macro for using hooks and properties in async environements.
/// A helper macro for using hooks and properties in async environments.
///
/// # Usage
///
@@ -54,8 +54,8 @@ macro_rules! to_owned {
pub mod computed;
mod use_on_unmount;
pub use use_on_unmount::*;
mod use_on_destroy;
pub use use_on_destroy::*;
mod use_context;
pub use use_context::*;
@@ -84,5 +84,7 @@ pub use use_callback::*;
mod use_memo;
pub use use_memo::*;
mod use_on_create;
pub use use_on_create::*;
mod use_root_context;
pub use use_root_context::*;