https://kotlinlang.org logo
#compose-web
Title
# compose-web
l

LeoColman

12/11/2021, 3:08 PM
Hey guys! How do you organize your projects to play around with the UI? I tried to create the structure: -- jsMain -- components -- MyComponent.kt <-- Contains a @Composable function that I want to render -- jsTest -- components -- MyComponentPlayground.kt <-- Launches only MyComponent, so I can develop it instead of rendering all the screen But I don't really know how to run this custom component. I tried creating a
Copy code
suspend fun main() {
        renderComposable("root") {
        Style(AppStyleSheet)
        component()
    }
}
but I don't know how I'd execute this main. I was going to write a simple main for every component, but that doesn't seem very feasible
Maybe there's a way to configure which main will run on
gradlew jsBrowserRun
?
b

Big Chungus

12/11/2021, 4:45 PM
I just have sandbox module
👍 1
l

LeoColman

12/11/2021, 5:02 PM
Interesting, I think it's the same thing I was looking for
I'll copy yours K
Thanks @Big Chungus
4 Views