Skip to main content

Hotwire

Small helpers for working with Hotwire Turbo streams.

Response.turboStream

Marks an existing response as a Turbo Stream by replacing its Content-Type with text/vnd.turbo-stream.html.

renderTemplate(request, "items/_row", model).turboStream()

turboStreamRefresh

Returns a Turbo Stream response with a <turbo-stream action="refresh"> body, used to ask the client to perform a full page refresh.

fun turboStreamRefresh(): Response