Skip to main content
What useTapStorage returns: a read of the document, plus the two writes.

Extends

Type Parameters

T

T

Properties

data

undefined until the first answer for this key arrives. A later call that fails leaves the last answer in place and only sets error, so branch on error to detect a failure, never on data.

Inherited from

TapQueryResult.data

error

Inherited from

TapQueryResult.error

isLoading

true only while the first answer for this key is in flight.

Inherited from

TapQueryResult.isLoading

Methods

patch()

Merges the fields in and resolves to the merged document.

Parameters

partial
Partial<T>

Returns

Promise<T>

refetch()

Asks again now, whether or not the cached answer has gone stale.

Returns

void

Inherited from

TapQueryResult.refetch

save()

Replaces the whole document.

Parameters

document
T

Returns

Promise<void>