Search
Items tagged with: statefulComponents
And here’s a real-world example of the lifecycle of an action performed on a local copy of the Gaza Verified web site¹ showing the event from the toggle button on the client being automatically mapped to the relevant event handler on the SignUpsSwitch Kitten component instance on the server and that handler setting a boolean on a JavaScript object in memory, which is automatically persisted to disk via Kitten’s default JSDB² database.
Note that Kitten is smart enough to automatically redact fields in the log output that look like they might be secrets.
All this is in the stateful-components-api-breaking-change branch³ at the moment and will be in the next release.
¹ gaza-verified.org
² codeberg.org/small-tech/jsdb
³ codeberg.org/kitten/app/src/br…
#SmallWeb #Kitten #web #dev #statefulComponents #streamingHTML #hypertext #GazaVerified
You also have some helpful new error messages to look forward to :)
#SmallWeb #Kitten #NodeJS #JavaScript #web #dev #statefulComponents #streamingHTML #hypertext #errorMessages
PS. The updated component render you’re seeing streamed to the browser in the previous screenshot is the code rendered by Kitten (showing the underlying HTMX internals, etc.)
The code you write in Kitten is considerably less complicated.
The attached screenshot is all the code in the simple counter example (all in one file, index.page.ts). To run it, you’d just run `kitten` in the directory that file is in and then hit https://localhost.
#SmallWeb #Kitten #web #dev #statefulComponents #streamingHTML #hypertext #webSockets
Very excited about the new stateful components model in Kitten¹ that I’m looking forward to releasing this week (finally) and the amount of visibility you can now get into the flow of your Kitten apps in the Kitten Interactive Shell (REPL)².
Since the new model is a breaking change (Kitten is prerelease) I’m in the middle of updating our own apps/sites and I still need to document everything. So it will take me a few days to do all that but then I’m very much looking forward to focussing on finishing up Catalyst and Yarn³ for launch this year.
It’s been a six year trek to reach what will essentially be the starting point of the Small Web :)
💕
PS. If you want to support our work, please see small-tech.org/fund-us/
¹ kitten.small-web.org
² kitten.small-web.org/tutorials…
³ ar.al/2024/06/24/small-web-com…
#SmallWeb #Kitten #web #dev #statefulComponents #streamingHTML #hypertext #webSockets
Small Web: computer science colloquium at University of Groningen
Download the video and watch it with your favourite video player. Recording1 of the live stream of a computer science colloquium on the Small Web I presented at the University of Groningen on June 11th, 2024.Aral Balkan
