> ISPO SDK documentation. [HTML](https://ispo.ai/docs/interfaces/react.WritableStore.html) · [Documentation index](https://ispo.ai/docs/llms.txt)

# Interface WritableStore<T>

```typescript
interface WritableStore<T> {
    getSnapshot(): T;
    setSnapshot(next: T): void;
    subscribe(listener: StoreListener): () => void;
    update(updater: (current: T) => T): void;
}
```

Types: [T](#t), [getSnapshot](#getsnapshot-1), [setSnapshot](#setsnapshot-1), [subscribe](#subscribe-1), [StoreListener](../types/react.StoreListener.md), [update](#update-1)

#### Type Parameters

*   <a id="t"></a>T

#### Hierarchy

*   [ReadableStore](react.ReadableStore.md)<[T](#t)\>
    *   WritableStore

##### Index

### <a id="methods"></a>Methods

[getSnapshot](#getsnapshot) [setSnapshot](#setsnapshot) [subscribe](#subscribe) [update](#update)

## <a id="methods-1"></a>Methods

### <a id="getsnapshot"></a>getSnapshot

*   <a id="getsnapshot-1"></a>
    
    ```typescript
    getSnapshot(): T
    ```
    
    Types: [T](#t)
    
    #### Returns [T](#t)
    
    Inherited from [ReadableStore](react.ReadableStore.md).[getSnapshot](react.ReadableStore.md#getsnapshot)
    

### <a id="setsnapshot"></a>setSnapshot

*   <a id="setsnapshot-1"></a>
    
    ```typescript
    setSnapshot(next: T): void
    ```
    
    Types: [T](#t)
    
    #### Parameters
    
    *   next: [T](#t)
    
    #### Returns void
    

### <a id="subscribe"></a>subscribe

*   <a id="subscribe-1"></a>
    
    ```typescript
    subscribe(listener: StoreListener): () => void
    ```
    
    Types: [StoreListener](../types/react.StoreListener.md)
    
    #### Parameters
    
    *   listener: [StoreListener](../types/react.StoreListener.md)
    
    #### Returns () \=> void
    
    Inherited from [ReadableStore](react.ReadableStore.md).[subscribe](react.ReadableStore.md#subscribe)
    

### <a id="update"></a>update

*   <a id="update-1"></a>
    
    ```typescript
    update(updater: (current: T) => T): void
    ```
    
    Types: [T](#t)
    
    #### Parameters
    
    *   updater: (current: [T](#t)) \=> [T](#t)
    
    #### Returns void
