Mantas Varnagiris
03/03/2020, 9:24 PMcompose-router
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. https://github.com/mvarnagiris/compose-navigationshikasd
03/04/2020, 1:04 AMcompose-router
when you started?molikto
03/04/2020, 7:28 AMMantas Varnagiris
03/04/2020, 8:33 AMcompose-navigation
only NullableBackStackAmbient
is internal. I need that one to find parent back stack. But BackStackAmbient
is public and will give you closest back stack (You can nest back stacks). You can use it.
@shikasd When I started I forked compose-router
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 compose-router
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}'