pub fn use_reactor_bridge<'hook, R, F>(
    on_output: F
) -> impl 'hook + Hook<Output = UseReactorBridgeHandle<R>>where
    R: 'static + Reactor + 'hook,
    F: Fn(ReactorEvent<R>) + 'static + 'hook,
Expand description

A hook to bridge to a Reactor.

This hooks will only bridge the reactor once over the entire component lifecycle.

Takes a callback as the argument.

The callback will be updated on every render to make sure captured values (if any) are up to date.

Note

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

pub fn use_reactor_bridge<R, F>(on_output: F) -> UseReactorBridgeHandle<R>
where
    R: 'static + Reactor,
    F: Fn(ReactorEvent<R>) + 'static,
{
    /* implementation omitted */
}