HLiveKit
A companion toolkit of small, focused helpers for the things HLive's core doesn't cover on its own.
Each feature below lives in github.com/SamHennessy/hlive/hlivekit, HLive's companion toolkit package. Where the core framework stays deliberately small — Tags, Components, Events, and the diffing engine — hlivekit builds on top of it to solve the problems almost every real app runs into: dynamic lists of components, giving an input focus, real-time updates across sessions, scrolling and redirecting from the server, and more.
Every page below has its own overview, API surface, use case, and a code sample grounded in HLiveKit's real source.
Features
- Component List — Manage a dynamic collection of components, like the rows of a table, without leaking memory.
- Component Get Nodes — Swap in a custom GetNodes function when a component's children can't be fixed at construction time.
- Focus — Give an input browser focus from the server, with no JavaScript of your own.
- Diff Apply — Run server-side logic the instant a DOM change actually lands in the browser.
- Element Visibility — Fire a server handler when an element scrolls into or out of the viewport.
- Scroll — Move the browser's scroll position from the server, either to an element or to a pixel offset.
- Redirect — Send the browser to a new URL from a server-side event handler.
- Preempt Disable — Disable a control in the browser the instant it's clicked, before the round trip to the server even starts.
- PubSub — A shared publish/subscribe bus for pushing real-time updates to components, sessions, or both.
- Cache — Cache a page's SSR output so repeat requests skip rendering entirely.