Travis Reitter
04/19/2022, 4:22 PMtodoapp
example as a model for rebasing my app on MVIKotlin. I'd like to make my migration a little more gradual and just rewrite the root view at first (which is already a list view in my app) and have item taps launch the existing detail view `Activity`s directly like it currently does. In the todoapp
, tapping on an item ends up in TodoRootUi
with TodoRootContent()
returning the Edit composable and this is all within the compose-ui
module instead of the Android module. What's the best way to instead launch an Activity
on Android and display a specific ViewController
on iOS? I definitely want to migrate the rest of the UI to match the todoapp
model but want to avoid rewriting all of the UI in one step 🙂Arkadii Ivanov
04/19/2022, 4:31 PMFragments
on Android and SwiftUI's NavigationLink
on iOS. This should be easily replaceable with Activities
and ViewControllers
.Travis Reitter
04/19/2022, 4:49 PMTravis Reitter
04/20/2022, 4:26 PMsample
code. It seems like a decent migration path would be:
1. add MVIKotlin and related dependencies to my app
2. use a structure like the sample
app to launch my existing Activity
classes
3. migrate my Activity
(and Fragment
) classes, one by one, to being thin wrappers around `Composable`s
4. once all my UI is effectively in Compose, move to a structure like the todoapp
to cut out some of the boilerplate?
Is this a path you'd recommend? Do you have other suggestions?Arkadii Ivanov
04/20/2022, 4:36 PMTravis Reitter
04/20/2022, 5:33 PMTravis Reitter
04/20/2022, 5:33 PMActivity
and Fragment
classes but definitely enough that it'd be good to do that as a separate step. Also, multiply all of those by 2 to account for iOS 🙂