Compose has a navigation library, then why we need to use a third party one? Also, the compose navigation looks more simpler.
a
Arkadii Ivanov
11/11/2020, 8:16 PM
Decompose
is a bit more than just navigation. It also provides Lifecycle, state preservation, ability to retain instances over configuration changes, etc. Here is an article about it. Decompose components are like Fragments (or BLoCs).
My own opinion - we should use Compose for dumb simple UI, and navigation and business logic should be kept outside of UI. That's why Decompose. š
Arkadii Ivanov
11/11/2020, 8:35 PM
One of the benefits of such approach is that we already can write business and navigation logic shared between Android/JVM/Native/JS. And just plug different UI: Compose for Android and JVM, SwiftUI for iOS, React for JS, etc.
s
suresh
11/11/2020, 8:53 PM
Android/JVM/Native/JS.
Agreed. What i was suggesting is, there should be something builtin (which is already part of compose, but not available on desktop) for simpler use cases and if you want to go for full MPP, use decompose for advanced scenarios. Not everybody is doing MPP and my use case right now is just desktop.