Skip to main content
Image

r/solidjs


Melbourne Compose - Functional Programming in-person Meetup. Thurs Oct 15. Ben Hutchison on "VDOM or Not VDOM"
Melbourne Compose - Functional Programming in-person Meetup. Thurs Oct 15. Ben Hutchison on "VDOM or Not VDOM"
Melbourne Compose - Functional Programming in-person Meetup. Thurs Oct 15. Ben Hutchison on "VDOM or Not VDOM"

Melbourne Compose - functional programming in-person meetup.

Next monthly meeting is Thursday Oct 15, 6-8pm.

Ben Hutchison is presenting on:

VDOM or not VDOM? A survey of incremental UI updates in React, Elm, Svelte, SolidJS and Laminar

See luma event for further details. https://luma.com/tifloa9m

upvotes

Advertisement: The best shooter games are played with friends. Squad up and dominate lobbies together on Roblox.
The best shooter games are played with friends. Squad up and dominate lobbies together on Roblox.
media poster


A cool framework-agnostic animation library for streaming
A cool framework-agnostic animation library for streaming

Hey all,

I’ve been working on a small library called Stream Morph.

The idea is to make streamed responses feel less like content is constantly being appended/re-rendered, and more like the response is gradually taking shape.

Demo: https://stream-morph.vercel.app/

It’s framework agnostic and can be used with any kind of streamed content. The demo includes plain text, Markdown, code blocks, charts, images, reasoning sections, Mermaid diagrams and a few more complex response flows.

The library handles the motion between updates, while your own renderer/app stays responsible for the actual content. So it isn’t tied to a specific AI SDK or framework.

A basic example looks roughly like this:

import { createStreamMorph } from "stream-morph";

const stream = createStreamMorph(response);

for await (const chunk of incomingStream) {
  stream.write(chunk);
}

stream.finish();

I mainly built it because I wanted streamed interfaces to feel a bit more intentional without having to build custom animation logic for every response type.

The package itself is already working and the demo is live. I’m still cleaning up some things around CI, tests and the repo setup, but the GitHub repository will be open sourced shortly as well.

Would be interested to hear what people think, especially about the animation behaviour/performance and any edge cases you’d expect from real streaming responses.