Is there any reasonable good navigation solution t...
# compose-desktop
m
Is there any reasonable good navigation solution that can be shared among android, jvm and ios? something like androidx.navigation?
m
I would suggest voyager, specfically my fork that has a few fixes over the main one https://github.com/Syer10/voyager I've seen Decompose mentioned, but I liked the Voyager API better
m
Could those fixes be reintegrated?
m
Of course. I mainly have the fork since the Voyager dev doesn't seem to have much time to work on it
m
that sounds nice of you but scary in general šŸ˜†
k
That’s true in general though. Not sure what the numbers are, but there’s not a lot of single-dev repositories out there that stay active after the initial burst of interest.
m
@Kirill Grouchnikov agreed agreed. and hello btw. šŸ™‚
m
And the good thing about open sources is that I can easily fix it myself if needed šŸ˜„
m
It would be best if you could become a contributer to support the library in the future. :)
m
I have multiple PRs to the original currenty that have a few of my fixes. I need them to be merged first before I start doing other PRs. For now you can use my fork, its published on maven central
k
That works only if the original developer is willing to accept contributions, which is not always the case if they have ā€œmoved onā€ and are not in that mental space anymore
m
good to hear. thanks for your efforts šŸ‘
reading through some of the docs... i might give voyager a shot. atm there is not much out there.
c
There was a thread in #compose-web the other day asking for a similar thing, and there are a few options listed there for routing. Not all of them are available for all platforms though, since most routers out there right now are tied directly to Compose. I’m currently working on a URI-based router that lives outside of the UI layer (not tied to Compose, Android, or anything else), which makes it ideal for usage across all platforms. I’m getting close to publishing it, and just need to finish the examples and documentation. You can see the current examples here to see if this might suit your needs, and join us over in #ballast if you have any questions or need help getting started
m
thanks for chiming in. could be interested as well once documented some more. will it be able to integrate with ui kits? eg compose. save state etc.
c
It basically exposes a
StateFlow
for easy integration into Compose, and also sends one-time events for handling discrete navigation requests like Android FragmentTransactions. The examples show both ways of using it I’m intentionally keeping it framework-agnostic, but it’s built in such a way that it can be slotted into any framework pretty easily. And in the future, I may release a dedicated module with extension functions for Compose (most likely for transitions), but for now that is not planned. It’s easy enough to use something like
AnimatedContent
to provide the animations for now
m
ok sounds interessting