# Different URLs for different parts of a webapp

**URL:** <https://discuss.kotlinlang.org/t/different-urls-for-different-parts-of-a-webapp/26768>\
**Category:** Multiplatform\
**Created:** [May 4, 2023, 3:50pm UTC](https://discuss.kotlinlang.org/t/different-urls-for-different-parts-of-a-webapp/26768 "2023-05-04T15:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.tissot.imperial](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@benjamin.tissot.imperial](https://discuss.kotlinlang.org/u/benjamin.tissot.imperial)\
**Post date:** [May 4, 2023, 3:50pm UTC](https://discuss.kotlinlang.org/t/different-urls-for-different-parts-of-a-webapp/26768/1 "2023-05-04T15:50:08Z")

</div>

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:

```auto
fun main() {
    val container = document.getElementById("root") ?: error("Couldn't find container!")
    createRoot(container).render(App.create())
}

```

and my app is a functional component

```auto
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
