Does Voyager provide any kind of callback for inte...
# multiplatform
s
Does Voyager provide any kind of callback for inter module or inter library navigation? Basically, App will include Feature X lib with UI and to navigate to any App screens, i need to be able to call those screens through an interface or something similar Im fairly new to voyager, would appreciate any help
t
Voyager seemed fine and simple, but I really enjoyed using Decompose for my KMP navigation. It seemed more feature rich and well thought-out so maybe it has what you are looking for within it already. There's also some great documentation on it. I learned through this video (

https://www.youtube.com/watch?v=g4XSWQ7QT8g

) and then looking through documentation. The video is a little old and some things may be updates now. Good luck and let me know if you have any Qs.
s
Did look into decompose, it's a huge breakaway for me Learning curve might be a bit steep 😶‍🌫️
t
I had a buddy switch because the lifecycle calls are much simpler over voyager and he said it was very interesting and not too bad to change it over. Let me know if you want to jump on a call to discuss anything. I have lots of code samples I can share. The Phillip Lackner video is very thorough and he’s often over architected and you can simplify after you understand it more.
s
Looks like i'll be going with vanilla Navigation since my "App-Side" is already build with #C06CS4UCQ10. Since voyager maintains its own backstack this makes it difficult to work with other navigation libraries as they have their own stacks too. For this to work, i'll have to expose the navController from app side to the KMP library, for the graphbuilder. Technically, this should work, but lets see Only issue i see is that the destinations library internally might use slightly different vanilla Navigation versions or imports. Will have to dig into it. But yeah looks promising If you have exposure to Vanilla Navigation, we can hop on a call.
t
I opted for Decompose before I even touched Vanilla or I would be able to help you more on this. Is there no other way to tie this into a parent VM to then pass into a child VM for the view to use? Or assign your own navController to modify and pass in?
s
If you mean VM as in a ViewModel then i don't think that's of a concern here To be able to fully navigate between different screens and across both library screens and app screens i would require such a setup that tracks on the same backstack This would be to avoid manually handling these interactions