ads
Saturday, November 8, 2025
Show HN: I combine Htmx, LiveView and SolidJS for interactive server components https://ift.tt/G6B8EFH
Show HN: I combine Htmx, LiveView and SolidJS for interactive server components I like htmx, LiveView, React and Solid. They are great at different points, so I try to combine them in Solv (Stateless Offline-capable LiveView) and write a prototype to show the benefits. Solv's main idea is that stateless servers keep client's state in a volatile cache. It enables server components that are also interactive, which is best of both worlds between LiveView and htmx. Then fine-grained reactivity is added to achieve efficient DOM updates + minimal payload size. This provides: - SSR with close-to-zero rehydration cost. - No API endpoints, server can just read from DB then render & update clients directly. - Server components that are interactive. - Minimal payload for updates from server. - Stateless servers that can handle stateful-like request/response. - Avoid consistent connection to server, clients can work offline after page load, update local - state, keep pending server requests and sync later (can also use a sync engine like InstantDB to simplify some part of the page). Repo: https://ift.tt/HRWTIEe Demos deployed to: https://solv-03.phucvin.workers.dev/ (this uses a free plan of Cloudflare Workers) You can also run it yourself online: https://ift.tt/yJpSo9l Details: - Counter 01: simple counter work entirely at client. - Counter 02: 2 counters; increasing is client-side; reseting is a server action. - Counter 03: multiple counters; adding a new counter is a server action that also renders the component server-side (note that client handles the loading effect when button is clicked). More details in the repo. Thanks for reading, and please let me know if this is a good idea to continue. https://ift.tt/HRWTIEe November 8, 2025 at 11:34PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment