I built a pretty awesome demo of KTor+SSE and HTMX...
# kotlinx-html
a
I built a pretty awesome demo of KTor+SSE and HTMX. At least I think so. Have a look. 🙂 https://blog.f12.no/wp/2024/11/11/htmx-sse-easy-updates-of-html-state-with-no-javascript/ Slack Conversation
K 1
t
Kjempekul! Thanks for sharing.
❤️ 1
Yet another partial function spotted in Anders' implementation:
Copy code
fun partialHtml(block: BODY.() -> Unit): String = buildString {
    appendHTML().filter { if (it.tagName in listOf("html", "body")) SKIP else PASS }.html {
        body {
            block(this)
        }
    }
}
r
Thank you for your article, saved a lot of time for me! How do you think, am I hallucinating, or not: but it seems like
Compose Runtime
can be mixed to
SSE
as a View layer in order to rerender whole virtual DOM we have? This idea is inspired by Mosaic library, which uses
Compose Runtime
for building reactive UI in CLI apps. Also would add that
Compose Runtime
was inspired by
React
ideas of virtual DOM.
❤️ 1
a
Not really sure I understand the question, it seems outside my competency. Would have to dive deeper to understand. Sorry. 🙂