Skip to main content

use_bind_link

Function use_bind_link 

Source
pub fn use_bind_link<'hook, T>(
    link: UseLinkHandle<T>,
    data: UseDataHandle<T>,
) -> impl 'hook + Hook<Output = ()>
where T: 'hook + 'static + MsgData,
Expand description

Binds a link to a data.

Unbinds link, when current component is deleted.

§Note

When used in function components and hooks, this hook is equivalent to:

pub fn use_bind_link<T: 'static + MsgData>(
    link: UseLinkHandle<T>,
    data: UseDataHandle<T>,
) {
    /* implementation omitted */
}