RealtimeStoreListener

fun interface RealtimeStoreListener

Observes one key in the room's shared key/value store. Register with RealtimeStore.observe, which attaches nothing before the room is joined.

Functions

Link copied to clipboard
abstract fun onValueChanged(newValue: String?, updatedBy: Participant?)

Called every time the key is written, including writes made from this device — the store echoes your own setValue back, so drive state from here rather than from the call site and both sides stay in step.