cashapp / redwood

Multiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose
https://cashapp.github.io/redwood/0.x/docs/
Apache License 2.0
1.63k stars 70 forks source link

Consider supporting callbacks in modifiers #2024

Open JakeWharton opened 4 months ago

JakeWharton commented 4 months ago

Already working in regular Redwood, but protocol Redwood does not support it as it tries to serialize them which obviously fails. Within a widget we could have a monotonic integer with which we associate each lambda and then use that for sending the events backwards. Just gotta be careful about correctly freeing old lambdas if the modifier stack changes.

swankjesse commented 2 weeks ago

Would have a nice benefit to at least one use in Cash App. (Emoji Picking.)