I'm experiencing an odd error I ran into convertin...
# javascript
j
I'm experiencing an odd error I ran into converting some react classes to functional components. Replacing my code with even a couple simple FCs, I'm still getting this unexpected error:
Uncaught TypeError: $this$child._get_attrs__0_k$()._set_baz__qlpr75_k$ is not a function
.
Copy code
fun main() {
    render(document.getElementById("root")) {
        child(app)
    }
}

val app = fc<Props> {
    child(foo) {
        attrs.baz = "test"
    }
}

interface Bar : Props {
    var baz: String
}

val foo = fc<Bar> { props ->
    +props.baz
}
It's erroring on the line
attrs.baz = "test"
. Am I doing something wrong? I'm using version
17.0.2-pre.265-kotlin-1.5.31
of the Kotlin React wrappers.
1
Ah, figured this out. Need
external interface
for Props!
👍 1