https://kotlinlang.org logo
#compose
Title
# compose
l

Lilly

02/17/2021, 8:28 PM
Hi, is there a trend what navigation library to use. I'm currently using
compose-router
which is relative outdated. It feels like in the long run there will be only
navigation-compose
. I would be fine with switching to navigation-compose, but would like to hear some thoughts and feedback
d

Denis

02/17/2021, 8:32 PM
I don't know about the trend, but I use navigation-compose. Are there any compose-router features navigation-compose doesn't have?
i

Ian Lake

02/17/2021, 8:33 PM
One thing that I mentioned previously is that it is a level playing field - if you like a different navigation library, that's totally fine and they'd have access to the same set of underlying Compose APIs as Navigation Compose: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1613179206361900?thread_ts=1613159019.352800&cid=CJLTWPH7S
👍 3
r

rsktash

02/17/2021, 8:34 PM
For multi-platform Decompose
i

Ian Lake

02/17/2021, 8:36 PM
Yep, Decompose was actually what we were talking about in that other thread
l

Lilly

02/17/2021, 9:00 PM
@Denis no, I think navigation-compose does its job well. The main reason why I didn't already switch is the fact that it stacks onto the origin navigation library. It feels like I get a library which navigates in compose but also in views while I would expect a library which only navigates in compose @Ian Lake or am I wrong? Decompose... I'm not sure if I like it but I might give it a try.
d

Denis

02/17/2021, 9:10 PM
Well, I don't use views directly. I don't know what happens the level below compose, but there are no views in my code. I have one activity and setContent there for an app Composable.
l

Lilly

02/17/2021, 9:25 PM
Same for me... I'm not using views. I just mean that the library is a wrapper around the jetpack navigation library so navigation-compose has an internal dependency on the jetpack navigation library but that isn't a problem at all. Just saying that ypu get more as expected
j

Javier

02/17/2021, 9:26 PM
@Lilly the problem is Navigation Component library is not available as multiplatform library
👍 1
l

Lilly

02/17/2021, 9:26 PM
I'm not coding for multiplatform 🙂
And I currently see that Navigation Compose depends on ViewModel stuff which I also don't use anymore.
@Ian Lake
Yep, Decompose was actually what we were talking about in that other thread
Can you please link the thread here. I would like to have a look
i

Ian Lake

02/17/2021, 9:35 PM
I linked it above already?
Just for reference,
navigation-runtime
is the generic core for Navigation. It doesn't depend on views, fragments, compose, or anything. It is totally agnostic to any type of
Navigator
. Navigation Compose is a compose specific layer on top of that agnostic core that knows how to navigate between composables (just like
navigation-fragment
, a totally separate artifact, knows how to navigate between fragments)
👍 4
That agnostic core also means you get deep links, returning a result APIs, testing support, back stack integration, saving of state, etc. as part of that package
l

Lilly

02/17/2021, 9:51 PM
I linked it above already?
Upsi my bad.
Just for reference, 
navigation-runtime
 is the generic core for Navigation.
ok cool, good to know. Thanks for your thoughts guys!
3 Views