Premo icon indicating copy to clipboard operation
Premo copied to clipboard

Incompatibility with android/compose

Open lepicekmichal opened this issue 2 years ago • 2 comments

I tried to use your library but I have not been successful. The worst is it does not use NavHost/NavController inside, so I cannot inject viewModel that would be connected to one navigation destination.

I tried to implement NavHost together with your library, but also had no luck. Mainly because I am unable to register all destinations inside NavHost.

Or maybe I am missing something? Please let me know or provide a more complex example.

Complex example: multi-module project, composables via DI, viewModel per compose screen

lepicekmichal avatar May 04 '22 15:05 lepicekmichal

Premo offers its own way of how navigation should be arranged. In addition, Premo is a multiplatform library and should not depend on UI-framework. The main case is the reuse of the navigation logic on Android with Compose and iOS with SwiftUI. Jetpack Compose Navigation does not allow sharing navigation logic because it is placed in composables.

dmdevgo avatar May 04 '22 19:05 dmdevgo

Well, I guess I can agree with your statement, but it does not resolve the aforementioned problem with ViewModel per compose screen. Example, that is not as simple as provided, would be real helpful

lepicekmichal avatar May 05 '22 12:05 lepicekmichal