Hello everyone
I am using kotlin multiplatform for a school project where I’m basically building an e-commerce web-app. I have already done some kotlin in an Android environment but it is my first time handling front-end for the web (ever) so I’m very sorry if my question seems very basic
I am using Kotlin/JS with React for my front-end and I am not quite sure how I am supposed to handle my navigation (I have done pretty much every tutorial, but they only handle one page/URL).
My goal would be to go on another part of my web app (say, for example, the user’s cart) by clicking on a button that redirects towards another route/url.
Right now, my main method is very simple:
fun main() {
val container = document.getElementById("root") ?: error("Couldn't find container!")
createRoot(container).render(App.create())
}
and my app is a functional component
val App = FC<Props> {
NavigationBarComponent {}
}
The only solution I can think of right now is hiding/showing different components, but this means everything is on the same URL on the front-end (and I would think that something as important as URL navigation would be implemented in Kotlin/JS with React)
I would be super thankful if anyone has something to suggest to help me !
Thank you very much to those who have read this topic