How to make a DESKTOP + WEB multi-platform app?
I haven't found any intuitive guides or docs on this. How would one go about making a DESKTOP + WEB multi-platform app? This would mean shared styling, etc.
Thanks!
Web and Desktop don't share UI elements at the moment, as they have different rendering engines. So you can share only runtime part (recomposition logic).
We are working on Web-Canvas implementation, that will allow you to share UI elements too.
will there be any alpha preview of this anytime soon ?
Is it available yet?
Compose now targets web canvas , lot of bugs though and skia lib is huge
How can I add web canvas to an existing desktop+android project?
The current bugs are not a problem for now, since I plan to release this only next year
I have a project code editor that you can look at
https://github.com/Qawaz/compose-code-editor
Try to build this project , run browserRun task inside the Gradle tasks and it will launch a window
It uses compose 1.2.2 I plan to update to kotlin 1.8 and compose 1.3 soon
You can check the experimental examples here: https://github.com/JetBrains/compose-jb/tree/master/experimental/examples
I have created a project to play with compose multiplatform and also help to discover bugs, can check it here: https://github.com/pablichjenkov/templato
Thanks!
I will see how it is done in this projects
I think it should be better documented in readme and in Intellij project creation. You have an schedule for web canvas and ios becoming stable?