This example has served as an excellent starting point! I am beginning to have some success using Kotlin/JS with React as part of KMP project where ViewModels are shared with Android.
I made a few React hooks so we get something that looks like this:
val DummyScreen = FC<Props>() {
val di = useContext(DIContext)
val viewModel = useViewModel { DummyViewModel() }
val dummyUiState: DummyUiState by viewModel.uiState.collectAsState(DummyUiState())
val person: Person? by dummyUiState.personState.collectAsState(null)
Typography {
+ "Hello ${person?.firstNames}"
}
}
I know Android and iOS are the focus for Kotlin Multiplatform at the moment, but the new wrappers are making Kotlin/JS usable. I think having a solid demo here where many people are looking would be an asset.
Hi,
This example has served as an excellent starting point! I am beginning to have some success using Kotlin/JS with React as part of KMP project where ViewModels are shared with Android.
I made a few React hooks so we get something that looks like this:
I know Android and iOS are the focus for Kotlin Multiplatform at the moment, but the new wrappers are making Kotlin/JS usable. I think having a solid demo here where many people are looking would be an asset.
I'd be happy to work on a pull request for that.