Skip to main content

useObserver

Callable

  • useObserver<T>(source$: Observable<T>, observerOrNext: any): void

  • Subscribes the provided observer or next handler on source$ observable.

    This hook allows to do fine handling of the source observable.

    @example
    useObserver(source$, (nextValue) => {
    logger.log(nextValue);
    });

    Type parameters

    • T

    Parameters

    • source$: Observable<T>

      an observable

    • observerOrNext: any

      Observer or next handler

    Returns void