Stefano Rodriguez
11/03/2020, 3:53 PMrender
method
interface TestScreen<State: Any> {
val name: String
val initialState: State
@Composable
fun render(state: State, setState: (State) -> Unit)
}
alorma
11/03/2020, 4:13 PMStefano Rodriguez
11/03/2020, 4:17 PMbuild
function? You just use it normally? Perhaps the problem is related to the generic State
type and I have somehow to erase itAdam Powell
11/03/2020, 4:20 PMStefano Rodriguez
11/03/2020, 4:25 PMalorma
11/03/2020, 4:29 PMStefano Rodriguez
11/03/2020, 4:29 PMStefano Rodriguez
11/03/2020, 4:30 PM@Composable
fun PreviewBox(
selectedTestScreen: TestScreen<out Any>,
) {
selectedTestScreen.doRender()
}
alorma
11/03/2020, 4:31 PMStefano Rodriguez
11/03/2020, 4:31 PMZach Klippenstein (he/him) [MOD]
11/03/2020, 5:11 PMStefano Rodriguez
11/03/2020, 5:38 PMAdam Powell
11/05/2020, 2:38 PM