---
url: /api/kiln/functions/stateChanged.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / stateChanged

# Function: stateChanged()

```ts
function stateChanged<S>(s): Condition;
```

Run condition: true on the first frame (in Fixed: step) after any transition of this state.

## Type Parameters

| Type Parameter |
| ------ |
| `S` *extends* `string` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `s` | [`State`](../interfaces/State.md)<`S`> |

## Returns

[`Condition`](../type-aliases/Condition.md)
