t
AsyncHooks
trait AsyncHooks[Msg, Model]The dynamic async hooks of one LiveView lifecycle.
Defined by scalive.AsyncHooks. View source (scalive/api/src/scalive/lifecycle/Hooks.scala:403-418)
Methods2
attach
def attach(id: String)(hook: (Model, LiveAsyncEvent[Msg], MessageContext[Msg, Model]) => zio.package.Task[LiveHookResult[Model]]): zio.package.Task[Unit]Attaches hook under id, to run when a task the view started completes, before its message
reaches handleMessage.
The hook receives a LiveAsyncEvent with the task's key, outcome, and message. A halt skips
later hooks and handleMessage. Attaching an id that is already attached replaces that hook
in place.
Defined by scalive.AsyncHooks.attach. View source (scalive/api/src/scalive/lifecycle/Hooks.scala:411-415)
detach
def detach(id: String): zio.package.Task[Unit]Detaches the dynamic hook attached under id, if any. Static hooks cannot be detached.
Defined by scalive.AsyncHooks.detach. View source (scalive/api/src/scalive/lifecycle/Hooks.scala:418-418)