---
title: "snapshotObserver"
type: "property"
lastmod: "2026-08-27"
---
## API Reference

> Source set: Android

```kotlin
override val snapshotObserver = OwnerSnapshotObserver { command ->
        val exceptionHandler = uncaughtExceptionHandler
        var command =
            if (exceptionHandler != null) {
                {
                    try {
                        command()
                    } catch (e: Exception) {
                        exceptionHandler.onUncaughtException(e)
                    }
                }
            } else {
                command
            }

        if (handler?.looper === Looper.myLooper()) {
            command()
        } else {
            handler?.post(command)
        }
    }
```
