Hello guys, I am building a fullstack application ...
# multiplatform
d
Hello guys, I am building a fullstack application in kotlin multiplatform using kotlin-react wrappers for the front-end and ktor as backend serving the frontend. Also I have routing in place using kotlin-react-router-dom. I'm serving the front-end like this:
Copy code
embeddedServer(Netty, port = 8080, host = "127.0.0.1") {
    routing {
        singlePageApplication {
            useResources = true
        }
    }
}.start(wait = true)
I want to use client side routing in the front end like this:
Copy code
Link {
    to = "/page2"
}
This works when running the front-end only with
jsBrowserDevelopmentRun
. How can I get this to work when serving the front-end with ktor? Currently it only changes the url in the browser, leaving the site-content unchanged. When I realod the page, it shows the expected content.