AppleSauce
    Preparing search index...

    Function useObservableRef

    • Returns a mutable ref object and a BehaviorSubject.

      Whenever ref.current is changed, the BehaviorSubject will emit the new value.

      Type Parameters

      • TValue

      Parameters

      • initialValue: TValue

        The initial value of the BehaviorSubject.

      Returns [MutableRefObject<TValue>, BehaviorSubject<TValue>]

    • Returns a ref object and a BehaviorSubject.

      Whenever ref.current is changed, the BehaviorSubject will emit the new value.

      Type Parameters

      • TValue

      Parameters

      • initialValue: null | TValue

        The initial value of the BehaviorSubject.

      Returns [RefObject<TValue>, BehaviorSubject<TValue>]

    • Returns a mutable ref object and a BehaviorSubject.

      Whenever ref.current is changed, the BehaviorSubject will emit the new value.

      Type Parameters

      • TValue = undefined

      Parameters

      • OptionalinitialValue: TValue

        A optional initial value of the BehaviorSubject.

      Returns [MutableRefObject<undefined | TValue>, BehaviorSubject<undefined | TValue>]