https://kotlinlang.org logo
Title
f

Frank van der Laan

04/04/2023, 6:26 AM
What’s the latest state of (shared) navigation for KMM? Anyone very happy with anything else then Decompose?
k

Konstantin Tskhovrebov

04/04/2023, 7:13 AM
Voyager is my favourite! Easy and very powerful!
p

Pavel S

04/04/2023, 7:32 AM
Can it be used with non-compose UI though?
k

Konstantin Tskhovrebov

04/04/2023, 7:35 AM
Oh, you mean a navigation without ui. OK.
g

Gijs van Veen

04/04/2023, 7:43 AM
We have something in our library (iOS/Android) that supports Compose, XML, UIKit and SwiftUI https://github.com/splendo/kaluga/tree/develop/architecture
d

darkmoon_uk

04/04/2023, 1:01 PM
Worth remembering that navigation is management of presentation and view state. A library may be a big help, if you find one that aligns with your Apps opinions, but you don't have to use a library to do it, and one may even hold you back if you lately encounter a use case that your chosen library doesn't support. Consider what choosing 'no library' would mean, as one of your options when comparing 😊
c

Casey Brooks

04/04/2023, 2:04 PM
For a simpler option that’s purely focused on Routing, I recently released Ballast Navigation
I’ll also double-up on Chris’s point: you definitely don’t need a routing library, and in my experience I’ve found myself fighting the navigation libraries I’ve tried more than I’d like. You can get quite far with something like enums or sealed classes and a big
when
statement, especially in Compose using
AnimatedContent
for basic page transitions. And in fact, this is the basic idea I went with when building Ballast Navigation, basically a slightly more intelligent giant
when
block