> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tappify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TapStorageResult

> What useTapStorage returns: a read of the document, plus the two writes.

What `useTapStorage` returns: a read of the document, plus the two writes.

## Extends

* [`TapQueryResult`](/extensions/reference/frontend-api/Interface.TapQueryResult)\<`T` | `null`>

## Type Parameters

### T

`T`

## Properties

### data

```ts theme={null}
data: T | null | undefined;
```

`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`](/extensions/reference/frontend-api/Interface.TapQueryResult).[`data`](/extensions/reference/frontend-api/Interface.TapQueryResult#data)

***

### error

```ts theme={null}
error: Error | null;
```

#### Inherited from

[`TapQueryResult`](/extensions/reference/frontend-api/Interface.TapQueryResult).[`error`](/extensions/reference/frontend-api/Interface.TapQueryResult#error)

***

### isLoading

```ts theme={null}
isLoading: boolean;
```

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

#### Inherited from

[`TapQueryResult`](/extensions/reference/frontend-api/Interface.TapQueryResult).[`isLoading`](/extensions/reference/frontend-api/Interface.TapQueryResult#isloading)

## Methods

### patch()

```ts theme={null}
patch(partial): Promise<T>;
```

Merges the fields in and resolves to the merged document.

#### Parameters

##### partial

`Partial`\<`T`>

#### Returns

`Promise`\<`T`>

***

### refetch()

```ts theme={null}
refetch(): void;
```

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

#### Returns

`void`

#### Inherited from

[`TapQueryResult`](/extensions/reference/frontend-api/Interface.TapQueryResult).[`refetch`](/extensions/reference/frontend-api/Interface.TapQueryResult#refetch)

***

### save()

```ts theme={null}
save(document): Promise<void>;
```

Replaces the whole document.

#### Parameters

##### document

`T`

#### Returns

`Promise`\<`void`>
