> Compose for Web simplifies and accelerates UI...
# compose-web
n
Compose for Web simplifies and accelerates UI development for web applications, and aims to enable UI code sharing between web, desktop, and Android applications in the future.
I was wondering about this. As currently, it's possible to share practically all of the UI between android and desktop, are they hoping to achieve the same thing with web (or something similar)?
🙏 1
a
For now it’s possible to use expect/actual to implement platform-specific components and compose them in common code.
h
This is the idea behind Compose. But you can/should not share UI code only, but also your ViewModels and Repositories.
1
o
It depends: we could render to Canvas and get very significant UI code reuse, or could build Compose-like UI elements using DOM. Currently we are working on second approach, see https://github.com/JetBrains/compose-jb/tree/master/web/widgets for more details.
t
I'm just curious: what is performance difference of both approaches (Canvas vs DOM)?
s
Currently we are working on second approach
@olonho Why aren’t you pursuing the 1st approach first? It could be achieved faster, and allows achieving the goal of sharing code with web much more real. The approach that is being taken currently could take years to get right.
I’m just curious: what is performance difference of both approaches (Canvas vs DOM)?
Canvas will perform better, but makes accessibility more difficult, scraping more difficult, and has large bundles to download.
u
And I guess it would be a SEO desaster
s
@uli When I think SEO, I think static websites anyways. 90% of the react applications I’ve made are behind an auth wall, which makes SEO irrelevant.
👌 3
b
Same, any framework focused on building dynamic / highly interactive UIs very easy (such as Compose, React, etc.) is a perfect fit for business apps or app-like-experience-in-the-browser, not SEO-driven pages. I would love to see a canvas based solution today-ish, and an accessible-DOM based solution down the road.
👍 3
n
Listening to your arguments Scott and Brian I definitely agree.