Martin Vyšný
04/29/2022, 12:31 PMIgor Demin
04/29/2022, 1:35 PMNikolai IgottiYou can contact me instead of Nikolay. As far as I know Vaadin renders all components on server side. You want to wrap existing Vaadin components into @Composable functions?
Martin Vyšný
04/29/2022, 4:09 PM@Composable
functions will run and will create Vaadin classes, such as Button and Span. Perhaps the solution might be closer to Compose-Desktop because of targeting JVM?
I think I'm looking for a document which explains in detail how exactly Compose observes the changes done to the MutableState, and how can I plug in with my Vaadin-related functions 🙂Igor Demin
04/29/2022, 5:54 PMPerhaps the solution might be closer to Compose-Desktop because of targeting JVM?
It is probably in between. You need a compose runtime library, which is built for JVM (desktop):
import org.jetbrains.compose.compose
plugins {
kotlin("jvm")
id("org.jetbrains.compose")
}
repositories {
mavenCentral()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev|https://maven.pkg.jetbrains.space/public/p/compose/dev>")
google()
}
dependencies {
implementation(compose.runtime)
}
and use an approach, which is used for Compose Web for DOM (“compose” dom elements into some existing DOM container)
You can look at an example how to integrate Compose with external UI framework.
Also you can look at mosaic - it uses Compose (another fork of it) to build a console application.Igor Demin
04/29/2022, 6:08 PMYou can look at an exampleNote that code can be not optimal there. Instead of
EmptyApplier
, you might want something like Applier<ExternalComponent>
. But it is a good start.Martin Vyšný
04/30/2022, 5:25 AMhfhbd
04/30/2022, 7:33 AMMartin Vyšný
05/01/2022, 12:27 PMhfhbd
05/01/2022, 5:10 PMFudge
05/08/2022, 10:12 AM