Nikola Milovic
09/16/2021, 11:48 AMval MainScreen = fc<MainProps> { props ->
...
sidebar { // has props with children
when (child) { // this causes crash
is Main.Child.Chat -> p{attrs.text("heloooo test")}
else -> p{attrs.text("heloooo error")}
}
}
}
external interface SidebarProps : PropsWithChildren {
}
val sidebar = fc<SidebarProps> { props ->
props.children?.forEach {
child(it)
}
}
turansky
09/16/2021, 10:50 PMprops.children()
Exampleturansky
11/16/2022, 5:21 PM+props.children
Cheick Kante
11/16/2022, 8:17 PM