4 ms·
Elixir is fantastic. Liveview is a huge productivity multiplier - lot of boilerplate disappears.
by recroad 1y ago
Elixir is fantastic. Liveview is a huge productivity multiplier - lot of boilerplate disappears.
- andrewflnr 1y agoLiveView is fun, but my problem is that in practice I often want local-first state. Is there a good way to do that with LiveView, maybe a clean way to write the little javascript snippets so they work with local state?
- SJMG 1y agoLiveSvelte or LiveVue have some impressive demos. I've never used them though.
- ipnon 1y agoLiveView already has local first state. The magic in LiveView is how it uses WebSocket connections to the client to keep the client state in sync with the server state. This is why you just need to update the socket and the rest just works. If you want to have some state that only exists on the server, then you simply don’t assign that data to the socket.
- andrewflnr 1y agoI guess I should have said "offline-first".
- arcanemachiner 1y agoAlpine.js is a good tool for this, but it can have issues when LV updates the DOM.
- mau013 1y agoCheckout Hologram. It aims at client based state (but it’s all Elixir as it transpiles the Hologram pieces to JS).
- jamauro 1y agoYou can take a look at JS commands and hooks. Ultimately I came to the determination that while LiveView is cool, I think I want the opposite. I’m hoping Hologram will be the answer.