Skip to content

function useLifecycle view code

useLifecycle(
    root: Root, 
    lifecycle: Lifecycle
): Root

Uses the lifecycle as a dependency. When the root is started, all providers with the lifecycle's method will have it registered.

Parameters

root: Root

The root that should use the lifecycle.

lifecycle: Lifecycle

The lifecycle to be used.

Returns

Root

The same root for convenience.