https://kotlinlang.org logo
Title
m

mohamed rejeb

05/22/2023, 8:29 AM
Can we use compose-html and compose-web together ?
a

Alexander Zhirkevich

05/22/2023, 8:41 AM
m

mohamed rejeb

05/22/2023, 8:46 AM
This is talking about HTML tag in Compose for web, what about the opposite, Compose Web canvas inside Compose HTML project.
c

CLOVIS

05/22/2023, 8:46 AM
In both cases, it's possible to do manually (but requires a bit of knowledge of the internals of Compose), but there is no out-of-the-box API to do it
a

Alexander Zhirkevich

05/22/2023, 8:49 AM
Yes. I think nothing stops you from adding ComposeTarget canvas to you compose html page, but i am not sure they can directly communicate with each other.
c

CLOVIS

05/22/2023, 8:49 AM
AFAIK, you can have multiple Appliers reading from the global Snapshot with no issues, but you'll have to ensure their clocks are synced 🤔
Not an expert, though.
m

mohamed rejeb

05/22/2023, 8:51 AM
Thanks guys, I think that I need to give it a try.
c

CLOVIS

05/22/2023, 8:54 AM
I don't think there is an official tutorial on how to do it… I have studied how other libraries do it (I recommend Mozaic and Turbine)