Skip to content

Latest commit

 

History

History
102 lines (56 loc) · 2.33 KB

File metadata and controls

102 lines (56 loc) · 2.33 KB

ReactFire reference docs / ObservableStatus

Interface: ObservableStatus<T>

Type parameters

Name
T

Table of contents

Properties

Properties

data

• data: T

The most recent value.

If initialData is passed in, the first value of data will be the valuea provided in initialData UNLESS the underlying observable is ready, in which case it will skip initialData.

Defined in

src/useObservable.ts:55


error

• error: undefined | Error

Any error that may have occurred in the underlying observable

Defined in

src/useObservable.ts:59


firstValuePromise

• firstValuePromise: Promise<void>

Promise that resolves after first emit from observable

Defined in

src/useObservable.ts:63


hasEmitted

• hasEmitted: boolean

Indicates whether the hook has emitted a value at some point

If initialData is passed in, this will be true.

Defined in

src/useObservable.ts:45


isComplete

• isComplete: boolean

If this is true, the hook will be emitting no further items.

Defined in

src/useObservable.ts:49


status

• status: "error" | "loading" | "success"

The loading status.

  • loading: Waiting for the first value from an observable
  • error: Something went wrong. Check ObservableStatus.error for more details
  • success: The hook has emitted at least one value

If initialData is passed in, this will skip loading and go straight to success.

Defined in

src/useObservable.ts:39