Interface LifecycleOwner

Interface for managing lifecycle callbacks.

interface LifecycleOwner {
    removeLifecycleCallback(state, cbFn?): void;
    setLifecycleCallback(state, cbFn): void;
}

Implemented by

Methods

  • Removes a specific lifecycle callback or all callbacks for a lifecycle state.

    Parameters

    • state: LifecycleState

      The lifecycle state to remove the callback from.

    • Optional cbFn: LifecycleCallback

      The specific callback function to remove. If not provided, all callbacks for the state will be removed.

    Returns void

  • Registers a lifecycle callback for a specific lifecycle state.

    Parameters

    • state: LifecycleState

      The lifecycle state to register the callback for.

    • cbFn: LifecycleCallback

      The callback function to execute when the lifecycle state is triggered.

    Returns void

Generated using TypeDoc