How can we navigate in compose-desktop? Is there a...
# compose-desktop
v
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
okay thanks
h
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
Another question would be how relevant “navigation”, as we know it from the mobile world, actually is on the desktop.
👍 3
v
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
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
oh okay 😅
c
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
There is also Voyager that now is multiplatform: https://github.com/adrielcafe/voyager
👍 1
🎉 1
q
Voyager is great btw. Simple and works well.
v
okay thanks everyone for providing the navigation libs
r
This one was also looking interesting but had an outdated compose/kmp version: https://github.com/Tlaster/PreCompose
🙏 1
k
Thanks for the questions and answers! I don't know what to ask sometimes, but this was all helpful. 🤠👍