Returns a callback function and an events Observable.
When the callback is called, the Observable will emit the first argument of the callback.
⚠ Note: useObservableCallback
will call init
once and always return
the same Observable. It is not safe to access closure (except other Observables)
directly inside init
. Use ref or [[useObservable]] with withLatestFrom
instead.
Output value within Observable.
Selected values.
Returns a callback function and an events Observable.
When the callback is called, the Observable will emit the first argument of the callback.
(From v2.1.0) Optionally accepts a selector function that transforms a list of event arguments into a single value.
⚠ Note: useObservableCallback
will call init
once and always return
the same Observable. It is not safe to access closure (except other Observables)
directly inside init
. Use ref or [[useObservable]] with withLatestFrom
instead.
Returns a callback function and an events Observable.
When the callback is called, the Observable will emit the first argument of the callback.