Hello All, Can someone share there thoughts or ex...
# multiplatform
m
Hello All, Can someone share there thoughts or experience making a React Native app with KMP ?
k
It is convenient if you like Kotlin and need a web app. I did my https://terrakok.github.io/Compose-Multiplatform-Wizard/ with React and Kotlin
m
I want to experiment with react native for building screens + flow and KMP for logic & api integration
Don’t plan to use compose UI for now.
k
I don't use the compose
have you checked the source code?
k
sounds like a double work for me, in a sense that: • you write a shared kmp module, with logic and api integration • You have to write native modules per platform, in order to connect the shared kmp logic So in the end, you end up with writing native logic per platform
I think it does make sense, if you plan to re-use these kmp modules in different rn apps
m
@krzysztof : For point 2, i was thinking react native will solve for this..( based on my high knowledge of React native frameworks)
So my efforts would be saved.
@Konstantin Tskhovrebov : Nope will do shortly.
k
For point 2, i was thinking react native will solve for this..
Well, you still have to consume the kmp in RN, which is done via native modules
unless there is an option to write RN's Native Module in KMP
m
Do you think i making this over complicated?
k
I use KMP: JS and React as frontend + JVM for unit tests
k
@Mohit Sharma I think you need to consider tradeoffs as it highly depends on the use case. Creating a SDK for native apps and expanding this to React Native, sounds like a good trade off
business logic that is only consumed by RN seems bit over engineered and could be done in JS alone
k
JVM test ecosystem is the best. so, a testing is a perfect usecase IMO
p
There is reakt-native-toolkit which does native modules in kmp but it is limited to old arch I believe. We use kmp but so far it is mostly just for our home screen widgets. When it comes time for deeper integration we're going to try and use nitro-modules to generate most of the glue code. Eventually I would like to see if I can add kmp support directly to nitrogen (the code generator), since it is all marshalled through C++ there shouldn't be any showstoppers