Tiago Nunes
07/05/2021, 12:19 PMArkadii Ivanov
07/05/2021, 12:28 PMState
(the scope is not defined, it can be a whole app, a screen, a feature, or a part of a feature);
• To provide an abstraction for UI with efficient updates (however this is not obligatory, you can use whatever you want);
• To provide lifecycle aware connections (binding) between inputs and outputs (again this is not obligatory in any way).
Everything else is out of scope of the library, there are no definitions for “screens”, “features”, “modules”, etc.
You can find one of the architecture options in the samples. Again, this is just an example of one possible solution.
Arkadii Ivanov
07/05/2021, 12:29 PMController
is just to demonstrate how the library can be used in the shared code. It is more close to the Android Fragment.Arkadii Ivanov
07/05/2021, 12:31 PMViewModel
-like behaviour you can consider the `InstanceKeeper`: https://arkivanov.github.io/MVIKotlin/state_preservation.html
Or you can also check the Decompose library, it allows you to share the Navigation logic as well, and basically scopes your "screens" with a lifecycle. But this is assuming your are going using Jetpack Compose/SwiftUI or other declarative UI frameworks. For Android Views/UIKit it might be tricky to integrate.Tiago Nunes
07/05/2021, 3:11 PM