# ObservationTarget

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

## API Reference

> Source set: Common

```kotlin
public 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 }`.

## Properties

### isObservationValid

> Source set: Common

```kotlin
public 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.
