Hello, Is it possible to deploy Kotlin Multiplatform Mobile (KMM) with Compose Web on an Android WebView? Furthermore, given that Compose Web doesn't support Search Engine Optimisation (SEO), would it still be a viable solution for creating a web page primarily aimed at generating advertising revenue?
n
Nikita Lipsky
07/13/2023, 9:25 AM
You can try. AFAIK, Compose for Web works on Mobile Platforms, so it seems nothing prevents it to be shown in an Android WebView.
We have two targets of Compose for Web: JS and Wasm. Both are experimental but indeed Compose for Web/JS can run currently on more web browsers than Compose for Web/Wasm.
You may look at this sample to learn how to use Compose for Web/JS. I believe it should run in Android WebView.
a
ankur2037
07/14/2023, 11:09 AM
Thanks for your reply, let me check this. I've noticed in the official documentation, there is significant emphasis on Compose for Web/Wasm. Does this imply that Compose for Web/Js is being discontinued?
We have a substantial feature, underpinned by Kotlin Multiplatform Mobile (KMM) for business logic and Android Compose for UI. We aim to replicate this feature on our mobile website. Would it be advisable to explore the utilisation of Compose for Web/Js for this purpose? Or, would building the UI in native JavaScript serve our needs better?
n
Nikita Lipsky
07/14/2023, 11:31 AM
So far, we are keeping support of Compose for Web/JS but our intent is to replace it by Compose for Web/Wasm when major browser Wasm support lands. We believe that migration costs from CfW/JS to CfW/Wasm will be low, so you may experiment now with CfW/JS. However keep in mind that both approaches are experimental and we cannot guarantee anything regarding them.