Hello, Is it possible to deploy Kotlin Multiplatfo...
# compose-web
a
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
You can try. AFAIK, Compose for Web works on Mobile Platforms, so it seems nothing prevents it to be shown in an Android WebView.
a
I am trying to load the sample project using localhost on my Android device web view. It is giving me error about the missing web assembly support in Android web view. Does this means that web can't load website using Compose web in Android webview ? Project link : https://github.com/Kotlin/kotlin-wasm-examples/tree/main/compose-imageviewer#compose-multiplatform-for-web
n
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
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
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.
211 Views