Function ambient_element::use_module_message_effect
source · pub fn use_module_message_effect<Enter: ModuleMessage + Default, Exit: ModuleMessage + Default>(
hooks: &mut Hooks<'_>,
target_id: Option<EntityId>
)
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.