Screen with code on left, browse with More Kittens! button and lots of kitten emojis on the right. Code: if (kitten.db.kittens === undefined) { kitten.db.kittens = { count: 0} } const Kittens = () => kitten.html' <h1 id='kittens'> ${'🐱'.repeat (kitten.db.kittens.count) } </h1> export default () => kitten.html` <button name='moreKittens' connect style='width: -webkit-fill-available;' ›More kittens!</button> <${Kittens} /> ` export function onConnect ({ page }) { page.on ('moreKittens', () => { kitten.db.kittens.count++ page.send (kitten.html`<${Kittens} />`) })
https://s3-eu-central-1.amazonaws.com/mastodon-aral/media_attachments/files/112/524/847/053/064/064/original/e0c54e35836eaed9.png