olshevski / compose-navigation-reimagined

🌈 Type-safe navigation library for Jetpack Compose
https://olshevski.github.io/compose-navigation-reimagined/
MIT License
542 stars 18 forks source link

Is it possible that this library will be migrated to Jetbrains compose #21

Closed ZXHHYJ closed 1 year ago

ZXHHYJ commented 1 year ago

rt

olshevski commented 1 year ago

@ZXHHYJ No, sorry. I don't have current plans to do so. Also, I really don't have much time for such development and I'm not familiar with Kotlin Multiplatform.

On the other hand, I thought about this idea from time to time and I feel like it wouldn't be too hard to strip AndroidX Lifecycle/ViewModel dependencies and use the same code from the library in the multiplatform Compose, but what should be added instead of AndroidX then? Some multiplatform ViewModels implementation? Nothing at all? What are the requirements for such a library?

ZXHHYJ commented 1 year ago

Thank you for your answer.

xiaozhikang0916 commented 1 year ago

Sorry for commenting in a closed issue, but I really need a navigation lib for KMM project.

Since all the androidX libs like lifecycle and viewmodel are not available in KMM, is it possible to extract a androidx-free module in KMM common layer, only with the ability of switching between Composable functions.

And then introduce androidx libs in android platform specific module to provide any other abilities like retrieve ViewModelStoreOwner by entry.

ZXHHYJ commented 1 year ago

你可以看看这个,不出意外是你想要的。https://github.com/adrielcafe/voyager