Can you help me with kotlin app?
# getting-started
j
Can you help me with kotlin app?
🧵 1
k
Do you have any specific questions?
j
I was trying to create a KMP, but I still don't have enough experience in kotlin. So, I tried to create a kotlin-react app, but I got stuck on the part of rendering components according to their routes. So I'm trying the alternative of creating a Desktop app
I'm web developer. I started in the world of programming 9 months ago with web development. I learned react. now i'm trying to learn kotlin.
k
#react might be a good place to ask specific questions
âś… 1
j
But i'm trying to create a desktop kotlin app
k
http://sscce.org/ is a good place overall to start as far as how to ask questions that have the best chance of getting concrete answers. The more focused and specific your question is, the shorter your sample code is, the more complete your description is, the better the chance is that somebody will take a look and answer. Something vague along the lines “it’s just not working”, or huge code dumps of hundreds of lines with all sorts of internal dependencies - that’s when you start losing people in these forums.
j
You are right. I'm sorry for the bad question.
I would like to render components according to route in kotlin-react. I am getting the error: "Unresolved references" to exact, path and element on Route To solve that I tried this: install react-router-dom npm i react-router-dom in my component i try to use Route: import react.* import react.dom.* import react.router.dom.* import kotlin.browser.* import kotlinx.browser.document fun main() { render(document.getElementById("root")) { BrowserRouter { div { Route(exact = true, path = "/", render = { Home() }) Route(path = "/about", render = { About() }) } } } } fun RBuilder.Home() = div { h1 { +"Home" } p { +"Welcome to the homepage." } } fun RBuilder.About() = div { h1 { +"About" } p { +"This is the about page." } } in build.gradle.kts i try to import packages to use react-dom: val jsMain by getting { dependencies { implementation("org.jetbrains.kotlin-wrapperskotlin react18.2.0-pre.346") implementation("org.jetbrains.kotlin-wrapperskotlin react dom18.2.0-pre.346") implementation("org.jetbrains.kotlin-wrapperskotlin emotion11.9.3-pre.346") } } But still it is giving the above error.