I know Decompose and Voyager, but they seem like h...
# compose-ios
k
I know Decompose and Voyager, but they seem like heavy libraries to me. I need only simple navigation and official library.
🧵 1
a
AFAIK there is no official navigation library for Multiplatform Compose. If you find Decompose heavy, you may try https://github.com/xxfast/Decompose-Router , which looks pretty simple and light.
💯 1
t
PreCompose is very similar to jetpack navigation, and it's multiplatform.
👍 1
s
Why did you feel that Voyager is heavy library? We have a bunch extensions but it all optional. Voyager is only a Stack + Navigator composable that use the Stack API. You can easily use Voyager Stack API for bundling your own navigation API.
c
I doubt we’ll ever see an official navigation library, because navigation is somewhat out of the scope of Compose. Compose is focused on the UI layer of the app, but navigation gets into the territory of app architecture. And the Jetpack navigation library is very closely tied to Android, and I wouldn’t expect to see it ported to KMM like some of the other Jetpack libraries are. If you’re looking for a simpler routing option than Decompose or Voyager, I’ve built Ballast Navigation intentionally as just the backstack manager without being tied directly to Compose or anything else.
k
Thank you all for introducing the libraries! I prefer having fewer dependencies, so I’m hoping that Google will release an official navigation-compose library that supports KMM. However, until that’s possible, I’ll need to use other libraries, so I’ll try to find one that suits my preferences. My preferences are as follows: 1. An interface similar to the official navigation-compose 2. No dependencies on Android or Java, relying only on Jetpack Compose and Kotlin.
j
@Kensuke Sano I also have mixed feelings about those libraries. I prefer less 3rd party libs for the better. Even more for real production apps. E.g. your customer demands something that is currently not supported. In this case you have to ask the developer of the 3rd party lib to implement that feature and you don‘t know when it'll be implemented or ever will be. I am also currently looking for navigation for compose-multiplatform and had a look at these 3rd party libs. For me it seems that PreCompose is the one I would like to investigate more because it seems that its the one with the least overhead. But as I said before I do not like to use 3rd party libs for a crucial part as navigation so I hope I will learn alot by studying PreCompose (and others) to build up my own navigation.
@Kensuke Sano did you see this: https://github.com/xxfast/Decompose-Router?
1690 Views