https://kotlinlang.org logo
m

Mikołaj Kąkol

07/12/2023, 7:41 AM
hi, any navigation lib suggestions? 🙂 I know about decompose, but surly there is more, thx 😄
👍 1
p

Pablichjenkov

07/12/2023, 7:50 AM
Other popular ones are Voyager, Appyx recently went kmp and PreCompose. Circuit not sure if it falls under a navigation library or a full framework with injection included, but is popular too the same goes with Ballast.
m

Mikołaj Kąkol

07/12/2023, 7:53 AM
thank you 🙂 Voyager rings a bell, I'll check them all, many thanks 🙂
m

Michael Paus

07/12/2023, 8:44 AM
It always rings an alarm bell in me when I see so many different and incompatible solutions for a single problem 🧐
👍 1
p

Pablichjenkov

07/12/2023, 9:02 AM
You have 2 alternatives then. Either waiting for a big one G/JB/Square to come up with one solution or custom implementation 🤷🏻. Honestly, I don't see any danger in the coexistence of all these many nav libraries. You pick what you like, if you like it.
m

Michael Paus

07/12/2023, 9:08 AM
Or you come up with a solution that is so good that everybody is immediately convinced that it is worth switching to it 😉.
p

Pablichjenkov

07/12/2023, 9:24 AM
That too, in general teams tend to create their own architecture that involves custom navigation utilities/libraries. But it is true that, if one has a reference already or some work already done, it is easier to import and build upon 🙂
k

Kilian

07/12/2023, 10:22 AM
I’ve build my own custom navigation as all those libraries looked overcomplicated in my opinion. Not happy with navigation in compose at the moment 😕 actually one of the biggest pain points
👍 1
1
c

Casey Brooks

07/12/2023, 2:34 PM
I built Ballast Navigation to be close to a build-it-yourself nav system, but with just enough functionality to make it so you’re not having to implement routing, backstack management, etc.
Here’s my general thoughts on navigation at this point: In the past, navigation was really hard to get right, and very tightly coupled to the platform. Switching between Android activities/fragments (or iOS ViewControllers) was not easy to work with and really easy to mess up, especially with transition animations and deep links. Compose changes this completely. It used to be very difficult to swap out full-screen content, but in Compose it’s as easy as changing a
State
variable. Adding transitions is also fairly trivial using things like
AnimatedContent
. The fact that there are so many navigation libraries available now doesn’t strike me as a problem with navigation, as much as it speaks to how easy is it to do now in comparison to previous navigation. People are now able to build navigation libraries that work how they want them to, rather than fighting a tightly-coupled and highly opinionated library. And everyone has a different opinion on how navigation should work, which is why we have so many options. So you can explore different options and find the one that you like best (or just build your own), but a single all-encompassing solution isn’t as useful or valuable now as it once was.
👍 1
p

Pablichjenkov

07/12/2023, 3:55 PM
Makes a lot of sense, sorry I had misspelled your library in my comment above, just fixed it.
a

andylamax

07/14/2023, 9:56 AM
I also built captain . A url based navigation that you can use from common main, and works in all the platforms. Give it a swing
12 Views