Skip to content

function onSubRootUsed view code

onSubRootUsed(
    listener: (root: Root, subRoot: Root) -> ()
): () -> ()

Called when a "parent" root uses a "sub" root. The listener callback receives the root along with the used provider

Parameters

listener: (root: Root, subRoot: Root) -> ()

Fired when a root uses a "sub" root. The listener callback receives the "parent" root along with the used "sub" root

Returns

() -> ()

A callback that when called removes the listener.