ste
05/05/2021, 6:24 PM@Composable
fun Element(state: ElementState, content: @Composable ElementScope.() -> Unit) { ... }
class ElementState {}
@Composable
fun rememberElementState(): ElementState { ... }
class ElementScope {}
I was wondering why it is preferred against the version in the thread?
The guidelines do not mention it.ste
05/05/2021, 6:29 PMclass
keywords randomly here)
class Element {
companion object {
@Composable
fun Display(state: State, content: @Composable Scope.() -> Unit) { ... }
}
class State {
companion object {
@Composable
fun remember(): State { ... }
}
}
class Scope {}
}
Kirill Grouchnikov
05/05/2021, 6:49 PMTimo Drick
05/05/2021, 6:53 PMAdam Powell
05/05/2021, 7:16 PMElementState
from another module, effectively creating peer API that looks and feels the same. They cannot add more nested class elements to a class outside of their module/library.ste
05/06/2021, 8:09 AM