> Documentation index: https://developer.android.com/reference/llms.txt

# ObservationTarget

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ObservationTarget.kt+class:androidx.compose.ui.node.ObservationTarget) Added in [1.14.0-alpha01](https://developer.android.com/jetpack/androidx/releases/compose-ui.md.txt#1.14.0-alpha01) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalComposeUiHostApi
  interface ObservationTarget
  ```

*** ** * ** ***

A target of snapshot read observation, passed to `ComposeUiHost.observeReads`.

Hosts that observe reads on behalf of a Compose hierarchy can use `isObservationValid` to discard observations whose target has been removed, for example with `SnapshotStateObserver.clearIf { !(it as ObservationTarget).isObservationValid }`.

## Summary

| ### Public properties |
|---|---|---|
| `Boolean` | `isObservationValid` `true` while the target is part of the hierarchy. | Cmn |

## Public properties

### isObservationValid

Cmn Added in [1.14.0-alpha01](https://developer.android.com/jetpack/androidx/releases/compose-ui.md.txt#1.14.0-alpha01)

```
val isObservationValid: Boolean
```

`true` while the target is part of the hierarchy. `false` once it has been removed, after which its observations are no longer needed and can be discarded.