Open RageshAntony opened 1 year ago
renderComposable(rootElementId = "root")
here root
is an ID of an element (div for example) that is expected to be present in your html.
You need either add <div id="root"></div>
(see https://github.com/JetBrains/compose-jb/blob/master/tutorials/Web/Getting_Started/README.md#6-add-the-indexhtml-file-to-the-resources) or use renderComposableInBody
I have a question , though I don't want to create a new issue for it , Whenever compose gets an error on the web , the whole application freezes , is there a way to ignore runtime errors and keep going like javascript applications do If there is , how can I do that ?
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
I successfully added Kotlin JavaScript Target in my Kotlin Mutliplatform Mobile.
Then I included the Compose Web and designed a basic compose kotlin page.
I have added the index.html file in jsMain/resources folder and it's being served when running the gradle task jsProductionWebpack
Now when I open the index.html, I am getting some errors in the Browser console.
I can't understand the stacktrace.
If I run a page designed in Kotlinx Html, it's working perfectly
But compose web page throwing error
My Compose Page:
index.html:
gradle