OnChange

fun <T> OnChange(value: T, key1: Any? = null, key2: Any? = null, callback: suspend (T) -> Unit)

Runs callback whenever value or one of the optional keys changes.

This behaves like a LaunchedEffect tied to value, ensuring the latest callback is invoked with the updated value.