Can I share compose Code from my desktop and Andro...
# compose-web
t
Can I share compose Code from my desktop and Android app with my web app? I've tried to setup a multiplatform project but it looks like compose.ui, compose.foundation etc do not exist for web
b
You can only share basic non-ui stuff
Web only has compose.runtime artefact available in commonMain
t
Is this planned? Otherwise it isn't really multiplatform in the sense that I cannot share my ui code with minimal effort
b
It is already mpp as you can share your ui logic between android and desktop, and your rendering logic between all three.
Canvas based web widgets are in the works, which will unlock ui sharing at the cost of accessibility and bundle size
t
Yes I guess you are right. But I feel like it's not worth rewriting my entire UI in compose web. Is there any ETA for canvas based widgets?
And will these canvas based widgets on web truly allow me to reuse the same code? Or will i still have to make major adjustments?
b
See three posts above in this channel
1
h
One possibility to share compose code with web is manually creating the MPP implementations with expect/actual (and their limitations...), but it is time-consuming