Leandro Borges Ferreira
10/09/2023, 10:13 PMfun main() {
document.body?.appendText("Hello, world JS!")
}
But when I try this:
fun main() {
onWasmReady {
Window {
Box(modifier = Modifier.fillMaxSize()) {
Text("Hello, world JS!", modifier = Modifier.align(Alignment.Center))
}
}
}
}
I get a blank page... nothing happens =|.
Does anyone knows what this could be? Did anyone have this problem before?Pablichjenkov
10/09/2023, 10:17 PMLeandro Borges Ferreira
10/09/2023, 10:35 PMrenderComposable
with the id of a div as the parameter. But when I do this:
renderComposable(rootElementId = "root") {
Box(modifier = Modifier.fillMaxSize()) {
Text("Hello, world JS!", modifier = Modifier.align(Alignment.Center))
}
}
And this:
[...]
<body>
<div id="root"></div>
<script src="webApp.js"> </script>
</body>
</html>
I get the same thing... Okay, maybe I'm a super noob web developer (I'm a android dev, not web =|), but shouldn't this work? That's what i see in the samplePablichjenkov
10/09/2023, 11:11 PMcompose-web
and compose-html
. You probably want the second but you mentioned compose-web
. In any case, just find the proper example, clone it and make sure it works. Then build on top of that. Without code and the project is hard to see what could be wrongLeandro Borges Ferreira
10/09/2023, 11:53 PM