Closed andrewarrow closed 7 years ago
I was able to solve this with componentDidMount:
override fun componentDidMount() {
super.componentDidMount()
val div = document.getElementsByClassName("thegmap").item(0)
kotlinGoogleMap(div)
}
where render makes the thegmap div:
override fun ReactDOMBuilder.render() {
div {
div(classes = "thegmap") {
}
}
}
I've been converting this code:
https://github.com/Kotlin/kotlin-fullstack-sample/blob/master/frontend/src/org/jetbrains/demo/thinkter/HomeView.kt
to my own needs and got to a point where inside the render method I need to do:
this comes from https://blog.frankel.ch/kotlin-front-end-developers/ so the actual line I'm trying to call is line 33 here https://github.com/nfrankel/kotlin-frontend/blob/master/src/script.kt#L33
Is there a good way to do this from my HomeView.kt render method?