https://kotlinlang.org logo
Title
v

Vivek Sharma

01/11/2022, 10:51 AM
How can we navigate in compose-desktop? Is there any library or the mobile one is used
Or use a library like Decompose
☝️ 1
There are also samples in the jetbrains repo: https://github.com/JetBrains/compose-jb/tree/master/examples
v

Vivek Sharma

01/11/2022, 10:56 AM
okay thanks
h

hfhbd

01/11/2022, 1:13 PM
or https://github.com/hfhbd/routing-compose#desktoprouter But this library uses a URL like behavior. So for desktop only applications you could use your own state based navigation, or Decompose
m

Michael Paus

01/11/2022, 1:16 PM
Another question would be how relevant “navigation”, as we know it from the mobile world, actually is on the desktop.
👍 3
v

Vivek Sharma

01/11/2022, 1:56 PM
I have a different question, why isn't there navigation system for desktop, like their own library, navigation is so important, still there is nothing from JetBrains' side Or is there something other than Decompose? Or are they like forcing us to create and maintain our own navigation? I am new in
Desktop
yet, so as a newbie, I find navigation in Desktop difficult, don't know why
m

mikehearn

01/11/2022, 2:35 PM
Because traditionally desktop apps don't do "navigation", they use multiple windows instead.
Or side panes, or popups.
Look at IntelliJ itself - how would you express this UI in a navigation library? Probably not easily. Desktops have way bigger screens, way more options for the user to lay out UI to their preference. It's a different paradigm.
😎 1
4
v

Vivek Sharma

01/11/2022, 3:08 PM
oh okay 😅
c

Casey Brooks

01/11/2022, 3:21 PM
I've personally found traditional navigation with Decompose to be overly cumbersome, when what I really needed was just a way to swap out content for individual panels in a window. I've found this library to do that well, though it doesn't natively work with Desktop so I had to copy the sources to my project https://github.com/rjrjr/compose-backstack
s

SrSouza

01/11/2022, 4:15 PM
There is also Voyager that now is multiplatform: https://github.com/adrielcafe/voyager
👍 1
🎉 1
q

Quentin Dommerc

01/12/2022, 3:13 AM
Voyager is great btw. Simple and works well.
v

Vivek Sharma

01/12/2022, 4:59 AM
okay thanks everyone for providing the navigation libs
r

rattleshirt

01/12/2022, 8:32 AM
This one was also looking interesting but had an outdated compose/kmp version: https://github.com/Tlaster/PreCompose
:thank-you: 1
k

Kebbin

01/15/2022, 3:20 AM
Thanks for the questions and answers! I don't know what to ask sometimes, but this was all helpful. 🤠👍