Skip to content

function useLifecycles view code

useLifecycles(
    root: Root, 
    lifecycles: { Lifecycle }
): Root

Given an array of lifecycles, uses all lifecycles as dependencies. When the root is started, all providers with each lifecycle's method will have it registered.

Parameters

root: Root

The root that should use the lifecycles.

lifecycles: { Lifecycle }

The lifecycles to be used.

Returns

Root

The same root for convenience.