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.
https://github.com/phucvin/solv-03
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://stackblitz.com/~/github.com/phucvin/solv-03
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.