What is the reason compose HTML has become a siden...
# compose-web
a
What is the reason compose HTML has become a sidenote in Compose Multiplatform? The docs are sparse and the GitHub repo and website almost don’t show it anymore. I think that is a shame, because it has very valid usecases. And, it is an excellent example of how reactivity on the web can be obtained without virtual DOM mumbo jumbo.
2
j
Careful because the Compose slot table storage structure is basically a form of a virtual DOM which represents the node tree and state as a flattened structure that's iterated over to produce the set of changes which get applied to the DOM on each recomposition
a
Fair enough, but it doesn’t negate the fact that Compose HTML has very valid use cases. Aside from the fact that Canvas as a target currently lacks a lot of the UI/UX benefits the browser dom already has for ages.
j
Yeah I'm a big fan and use it on a few projects. Don't care at all about Compose UI on the web myself
a
They are IMHO complementary to each other but it appears to me it is “marketed” as a successor.
j
To answer your original question, it's likely because people want write once run everywhere semantics rather than having to write frontends for each platform and only sharing pure logic
👆 2
a
I’m afraid that having write once run everywhere is almost a pipe dream. You’ll always need platform specifics. But I am open to being surprised. I’ve seen multiple companies try it and everything looks great when one wants to make a todo list app, but the reality will be that you always need platform specific teams. But as I said before: I hope Jetbrains proves me wrong :) However I think that web is such a completely different platform. I just don’t see compose for web succeeding. DOM rendering in browsers is so extremely optimized. I think a compose canvas app will always feel “wrong”
o
compose.html is a standalone library which targets only k/js. So I'd say it's not a sidenote of Compose Multiplatform. It's more or less independent of Compose Multiplatform (the only dependency is compose runtime). The main readme has a paragraph about it. Also in tutorials https://github.com/JetBrains/compose-multiplatform/blob/master/tutorials/README.md And in samples https://github.com/JetBrains/compose-multiplatform/blob/master/examples/README.md The structure of pages was updated around half a year ago. those docs are indeed incomplete. Tutorials cover only some compose.html specific things, the rest is left to either genera/common l compose concepts or html/css docs.