# compose

Mantas Varnagiris

03/03/2020, 9:24 PM
I was playing with
library made by @Zsolt . Found a few issues regarding back stack sequence and while trying to fix I ended up with a very different code base. I also needed callbacks for navigation events for DI or SL to be able to scope instances. Then I went deeper into it as I want to learn more about Compose and ended up with another navigation library. So here it is. Feel free to use it. Hopefully this is going to be deprecated as soon as Google rolls out their. Now I have some feedback to give them once they start doing it.
❤️ 2
👌 1


03/04/2020, 1:04 AM
Hey, just curious, what did you lack / tried to improve in
when you started?


03/04/2020, 7:28 AM
I wonder why a Ambient backstack is not provided for all compose-router and this lib

Mantas Varnagiris

03/04/2020, 8:33 AM
@molikto in
is internal. I need that one to find parent back stack. But
is public and will give you closest back stack (You can nest back stacks). You can use it. @shikasd When I started I forked
because I was just curious how navigation can be implemented. Then I found issue there where back stack order is not kept (already filed an issue on github). I also needed back stack callbacks - when route was added, removed etc. - to be able to create `Scope`s for my service locator library. And when I was done doing these things - code base ended up being very different from
that's why I just published another library. But like I said - I hope they will soon become obsolete 🙂 TLDR: I'm new to Jetpack Compose so I just wanted to learn by doing something 🙂 Also what I thought was pretty cool is that you can do most of your library code in pure java/kotlin library. Android library layer is pretty thin. So if you want to manipulate back stacks in java/kotlin librarty you can by pulling in this dependency
implementation 'com.github.mvarnagiris.compose-navigation:core:{latest_version}'