# AdaptableLoadStateFunction

Canonical page: https://www.adaptabletools.com/docs/reference/adaptableloadstatefunction

Function that retrieves Adaptable state from storage or external source. Called during initialization to hydrate the application state.

The result is merged with `AdaptableOptions.initialState` before being passed to `applyState()`, so it may be partial (only the sections which were persisted) or empty / nullish (nothing was persisted yet).

This is the place to undo any custom storage format applied in `persistState()`.

```ts title="TypeScript"
export interface AdaptableLoadStateFunction 
```

## Calls

```ts title="TypeScript"
(config: AdaptableStateFunctionConfig): Promise<Partial<AdaptablePersistentState> | null | void>;
```

###### Parameters

| Parameter | Type |
| --- | --- |
| config | [`AdaptableStateFunctionConfig`](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md) |

###### Returns

`Promise<Partial<`[`AdaptablePersistentState`](https://www.adaptabletools.com/docs/reference/adaptablepersistentstate.md)`> | null | void>`
