https://kotlinlang.org logo
#compose
Title
# compose
z

Zach Klippenstein (he/him) [MOD]

04/10/2020, 4:38 PM
Question about future direction: With so many things moving to modifiers (I believe yall intend to make the semantics stuff configurable via modifiers?), has there ever been any thought about making ambients configurable via modifiers? E.g.
SomeComposable(modifier = Modifier.withAmbients(FooAmbient provides foo)) { … }
a

Adam Powell

04/10/2020, 5:09 PM
Much thought, I don't think that it's a good idea since they work with orthogonal concepts.
Modifiers decorate UI elements, where ambients are a property of the composition.
The composition builds the UI element tree.
z

Zach Klippenstein (he/him) [MOD]

04/10/2020, 5:10 PM
Cool, that makes sense. Thanks!
👍 1
2 Views