Very excited about the latest feature/workflow I’m adding to Kitten. I call it…
Streaming HTML
Implement back-end functionality and stream HTML updates to the client without writing any front-end JavaScript.
Just give your forms names and listen for them in an onConnect() handler you export from your page. Kitten handles everything else – setting up a WebSocket route for you, mapping triggers to events, etc. – thanks to Kitten + #htmx magic
So the canonical example for any new web workflow appears to be a simple counter button.
Here’s one showing you the new Streaming HTML workflow in Kitten¹.
Note that the count is actually being persisted in the database (notice I turn the development server off and back on again mid demo).
What you see in the video is all the code there is in the project.
Right, this is now merged in main.
Please consider the Streaming HTML workflow very experimental for the time being (as all of Kitten is, really, but this more so).
There’s also still scant documentation but that will improve in the coming days. (I’ve added this demo to the readme.)