fun <T> CompositionLocalProviderReturnable(
vararg values: ProvidedValue<*>,
content: @Composable () -> T
): T {
currentComposer.startProviders(values)
val t = content()
currentComposer.endProviders()
return t
}
but seems wonky
e
efemoney
01/24/2023, 7:26 PM
Curious, what do you put in a composition local for a molecule composable? 🤔
t
Trevor Stone
01/24/2023, 7:29 PM
Right now mostly brainstorming, but looking into opportunities to use Molecule on a backend service. Thinking that potentially putting some request header meta-data into the CompositionLocal to not require manual passing through the layers
e
efemoney
01/24/2023, 7:41 PM
Molecule on the BE is wild … I like it!
k
kevin.cianfarini
01/24/2023, 9:22 PM
We place a platform agnostic implementation of a lifecycle in our composition locals