? I'm reading that back to myself in Florina's voice, but I can't seem to place my finger on where I saw that guidance.
đź’ˇ 3
a
Adam Powell
05/26/2021, 10:34 PM
if it's not already in the API guidelines it probably should be. This was a deliberate (and long discussed) decision to express present tense instead of past tense if the event represents a request that the event handler should act on, as opposed to a passive notification that something happened to a hidden source of truth that the developer doesn't own.
🙏🏼 1
🙏 2
r
Rick Regan
05/26/2021, 11:08 PM
Here's an example, from one of the first pages I read when learning Compose (https://developer.android.com/jetpack/compose/state): "The lambda is called onNameChange—present tense, as the event doesn't mean the state has already changed, but rather that the composable is requesting that the event handler change it."
This makes sense to me for state changes, but not really for
onClick
, the click has already happened, the click indication ripple is animating, accessibility events were sent, so it looks to me like a “passive notification that something happened to a hidden source of truth that the developer doesn’t own”. But it’s still not called