---
title: "ProduceStateScope"
description: "Receiver scope for use with [produceState]."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
public interface ProduceStateScope<T> : MutableState<T>, CoroutineScope
```


Receiver scope for use with `produceState`.


## Functions

```kotlin
public suspend fun awaitDispose(onDispose: () -> Unit): Nothing
```


Await the disposal of this producer whether it left the composition, the source changed, or
an error occurred. Always runs `onDispose` before resuming.

This method is useful when configuring callback-based state producers that do not suspend,
for example:



