# RecomposerInfo

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/Recomposer.kt+class:androidx.compose.runtime.RecomposerInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  interface RecomposerInfo
  ```

*** ** * ** ***

Read-only information about a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`. Used when code should only monitor the activity of a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`, and not attempt to alter its state or create new compositions from it.

## Summary

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionObserverHandle?` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ExperimentalComposeRuntimeApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerInfo#observe(androidx.compose.runtime.tooling.CompositionRegistrationObserver)(observer: https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionRegistrationObserver)` Register an observer to be notified when a composition is added to or removed from the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerInfo#changeCount()` The running count of the number of times the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer` awoke and applied changes to one or more `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composer`s. | Cmn |
| `open https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerErrorInformation?>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/ComposeToolingApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerInfo#errorState()` Get flow of error states captured in composition. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerInfo#hasPendingWork()` `true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer` has been assigned work to do and it is currently performing that work or awaiting an opportunity to do so. | Cmn |
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html<https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer.State>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerInfo#state()` The current `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`. | Cmn |

## Public functions

### observe

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.9.0)

```
@ExperimentalComposeRuntimeApi
open fun observe(observer: CompositionRegistrationObserver): CompositionObserverHandle?
```

Register an observer to be notified when a composition is added to or removed from the given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`. When this method is called, the observer will be notified of all currently registered compositions per the documentation in `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionRegistrationObserver#onCompositionRegistered(androidx.compose.runtime.tooling.ObservableComposition)`.

## Public properties

### changeCount

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val changeCount: Long
```

The running count of the number of times the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer` awoke and applied changes to one or more `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composer`s. This count is unaffected if the composer awakes and recomposed but composition did not produce changes to apply.

### errorState

Cmn Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.11.0)

```
@ComposeToolingApi
open val errorState: StateFlow<RecomposerErrorInformation?>
```

Get flow of error states captured in composition. This flow is only available when recomposer is in hot reload mode.

| Returns |
|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<https://developer.android.com/reference/kotlin/androidx/compose/runtime/RecomposerErrorInformation?>` | a flow of error states captured during composition |

### hasPendingWork

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val hasPendingWork: Boolean
```

`true` if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer` has been assigned work to do and it is currently performing that work or awaiting an opportunity to do so.

### state

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
val state: Flow<Recomposer.State>
```

The current `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` of the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Recomposer`. See each `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` value for its meaning.