Is there a way for jetpack compose for web to use ...
# compose-web
c
Is there a way for jetpack compose for web to use continuous update mode (as in making changes will be reflected on the web page without having to rerun)?
c
Like any Kotlin/JS project, you can run the frontend with
./gradlew browserRun --continuous
to cold-reload. https://kotlinlang.org/docs/dev-server-continuous-compilation.html
(Note that this works for any Gradle task, you can also run your tests or your backend in continuous mode)
c
I didn't know that. Thank you.
a
@CLOVIS did you notice that when you change your code in continuous mode, it reloads like 6times before you see the actual change
c
No? I had one project where it reloaded twice, but that's it
a
Without disabled source map?
a
Thanks I'll check it out
d
@Cru you might want to check out my project https://github.com/varabyte/kobweb, it was designed from day #1 to support live reloading for Compose for Web development. I never really got
./gradlew browserRun --continuous
to work quite like I wanted. In Kobweb, your page will show a "Building..." spinner when code is building and it will auto-refresh when done. If you already tried
--continuous
mode in your own project and that worked for you, then carry on!