CLOVIS
01/06/2022, 9:23 AMPropsWithChildren
with the new syntax?
div {
className = classes
contents()
}
This puts the contents
in the `div`'s parent component, which means contents
are a previous sibling of div
. It seems like contents
is using the parent's ChildrenBuilder
and not the `div`'s.turansky
01/06/2022, 9:30 AMCLOVIS
01/06/2022, 10:27 AMfun ChildrenBuilder.contents() {
p { +"3" }
}
val C = FC<Props> {
p { +"1" }
div {
p { +"2" }
contents()
p {+"4" }
}
p { +"5" }
}
turansky
01/06/2022, 3:39 PMaerialist
01/09/2022, 7:30 PMCLOVIS
01/10/2022, 7:40 PMversions.properties
at the root of the project.CLOVIS
01/10/2022, 7:41 PMCLOVIS
01/10/2022, 7:44 PMCLOVIS
01/10/2022, 7:44 PMCLOVIS
01/10/2022, 7:45 PMCLOVIS
01/10/2022, 7:46 PMRBuilder
with ChildrenBuilder
, I didn't change much elseCLOVIS
01/10/2022, 7:49 PMChildrenBuilder
is called, the one passed is the one created by the nearest FC
in the hierarchy, not necessarily the parent HTML element.turansky
01/10/2022, 8:14 PM