> For the complete documentation index, see [llms.txt](https://angkira.gitbook.io/foxstore/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angkira.gitbook.io/foxstore/api-reference/store-options/saver.md).

# Saver

One of the most popular problem of state is saving it. On Frontend it is saving to any Storage or sending data to server. So I decided to offer you an API which allows to control saving of Store.

```typescript
export interface SaverOptions<State extends Record<string, unknown>> {
    /**
     * Select one of the default or create your custom Saver
     */
    saver: {
        new (store: ProtoStore<State>): Saver<State>;
    };
    /**
     * Which keys of State would be saved
     */
    keysToSave?: (keyof State)[];
    /**
     * Changing which keys of the State would be a trigger of saving
     */
    keysBySave?: (keyof State)[];
    /**
     * Project: Saver for separate entity in State
     * Does not work yet!
     */
    saverByKey?: SaverByKey<State>;
}
```

By default there is available savers like LocalStorageSaver.
