How do you pass children props to a class componen...
# react
c
How do you pass children props to a class component in Kotlin React? Currently, I'm doing:
Copy code
child(MyClassComponent::class) {
  child(SomeFunctionalComponent)
}
then, in MyClassComponent.render:
Copy code
if (...) {
  props.children()
}
This works fine with 
run
, but fails with `browserProductionWebpack`:
Copy code
TypeError: _.render is not a function
The commit with the full code (1 class component + its call), the version details. Originally posted in #javascript (here) but I was redirected here.
t
Legacy or IR?
c
IR
a
are your componenetss marked with
@JsExport
you must export your components with IR
c
Only class components? My project uses many functional components and I exported none of them.
This is the only class component I have, which is why I'm confused.
t
c
Interesting. I tried it and it didn't make a difference, but maybe that's because it wasn't a clean build. I found a workaround using an npm lib, but it's good to know for the future.