in kotlin-react-legacy/src/jsMain/kotlin/react/RBuilder.kt [24:40]
fun <P : Props> child(
type: ElementType<P>,
props: P = unsafeJso(),
handler: RHandler<P>? = null,
) {
if (handler == null) {
child(createElement(type, props))
return
}
val children = RElementBuilder(props)
.apply(handler)
.childList
.toTypedArray()
child(createElement(type, props, *children))
}