@Arkadii Ivanov What is the simplest approach for managing components in iOS not in the Swift code, but in the Kotlin multiplatform code? I would like to avoid adding Swift as soon as possible and wonder if I can create a RootComponent just with kotlin.
electrolobzik
12/24/2023, 7:11 PM
For example in Android I have the following code:
Copy code
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val rootComponent =
DefaultRootComponent(
componentContext = defaultComponentContext(),
)
enableEdgeToEdge()
setContent {
App(rootComponent = rootComponent)
}
}
}
electrolobzik
12/24/2023, 7:12 PM
in iOS I only have this right now:
Copy code
fun MainViewController() = ComposeUIViewController {
App()
}