https://kotlinlang.org logo
#mvikotlin
Title
# mvikotlin
f

Francis Mariano

07/22/2022, 11:05 AM
hello folks. Is it mandatory use compose with mvikotlin and decompose???
a

Arkadii Ivanov

07/22/2022, 11:11 AM
Hey! Not at all, you can use any combination of the mentioned libraries. However, Decompose is primarily designed for declarative UI frameworks. Even though there are extensions for classic Android views, the experience would be much smoother with Compose.
f

Francis Mariano

07/22/2022, 11:23 AM
ok, thank you. My last project I used classic views + MVP with KMM. now I am going start a new project and I am looking for better approach. Maybe I will use classic views again but with no MVP pattern. Do you think classic views + mvikotlin (without decompose) works fine?
a

Arkadii Ivanov

07/22/2022, 11:35 AM
Sure, MVIKotlin works just fine with any UI framework!
The MVIKotlin sample uses classic Android views https://github.com/arkivanov/MVIKotlin/tree/master/sample
f

Francis Mariano

07/22/2022, 11:38 AM
Nice. I will give a chance for decompose too. The shared router is really good.
Arkadii, my last question 🙂 . Decompose works fine with classic iOS views too???
a

Arkadii Ivanov

07/22/2022, 11:43 AM
For Decompose, you can check its sample as well. For Android, it features both Compose and Views UIs. https://github.com/arkivanov/Decompose/tree/master/sample For iOS, both MVIKotlin and Decompose samples use SwiftUI.
f

Francis Mariano

07/22/2022, 11:44 AM
ok thank very much for your support.
a

Arkadii Ivanov

07/22/2022, 11:45 AM
Decompose can work with any UI framework, including UIKit (classic iOS views). But there is no additional support (extensions) from the library, so you will have to come up with your own.
The most tricky part would be navigation - switching views following the Decompose router state.
f

Francis Mariano

07/22/2022, 11:52 AM
OK. I am doing a brainstorm myself. Android - classis view + decompose + mvikotlin iOS - SwiftUI + decompose + mvikotlin But the correct is use compose in android and swiftUI in iOS. And using compose everywhere in a near future.
a

Arkadii Ivanov

07/22/2022, 11:58 AM
Compose may be more convenient to use over Android views, but may be less stable or performant (e.g. list scroll may still lag, there are known memory leaks, etc.). On iOS the situation with SwiftUI is kinda the same - more convenient but not as stable as UIKit. But definitely - the future is with Compose and SwiftUI.
🙌 1
19 Views