# AdaptableStateFunctionConfig

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

State Function Config object passed into all State Options functions

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

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [actionName](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#actionname) | `string` | Name of the action that triggered the state change. |
| [adaptableApi](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#adaptableapi) | [`AdaptableApi`](https://www.adaptabletools.com/docs/reference/adaptableapi.md) | Adaptable API |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |
| [adaptableId](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#adaptableid) | `string` | Id of current Adaptable instance |
| [adaptableStateKey](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#adaptablestatekey) | `string` | State Key being used |
| [previousState](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#previousstate) | [`AdaptablePersistentState`](https://www.adaptabletools.com/docs/reference/adaptablepersistentstate.md) | Previous (persistent) state before the action was applied.<br/>This is useful for comparing changes or reverting if necessary. |
| [userName](https://www.adaptabletools.com/docs/reference/adaptablestatefunctionconfig.md#username) | `string` | current Adaptable user |

## Property Details

### actionName

Name of the action that triggered the state change.

```ts title="TypeScript"
actionName?: string;
```

###### Property Value

`string`

### adaptableApi

Adaptable API

```ts title="TypeScript"
adaptableApi: AdaptableApi;
```

###### Property Value

[`AdaptableApi`](https://www.adaptabletools.com/docs/reference/adaptableapi.md)

### adaptableContext

Custom application Context provided in `AdaptableOptions.adaptableContext`

```ts title="TypeScript"
adaptableContext: any;
```

###### Property Value

`any`

### adaptableId

Id of current Adaptable instance

```ts title="TypeScript"
adaptableId: string;
```

###### Property Value

`string`

### adaptableStateKey

State Key being used

```ts title="TypeScript"
adaptableStateKey: string;
```

###### Property Value

`string`

### previousState

Previous (persistent) state before the action was applied.
This is useful for comparing changes or reverting if necessary.

```ts title="TypeScript"
previousState?: AdaptablePersistentState;
```

###### Property Value

[`AdaptablePersistentState`](https://www.adaptabletools.com/docs/reference/adaptablepersistentstate.md)

### userName

current Adaptable user

```ts title="TypeScript"
userName: string;
```

###### Property Value

`string`
