Function ambient_api::prelude::ambient_element::use_module_message_effect
source · pub fn use_module_message_effect<Enter, Exit>(
hooks: &mut Hooks<'_>,
target_id: Option<EntityId>
)
Available on crate feature
guest
only.Expand description
Send the Enter
message when this Element
is mounted, and the Exit
message when it is unmounted.
If the target_id
is Some
, the message will be directed to that target; otherwise, it will be broadcast.