I think for now we should accept that this is the major trade-off we make when using LiveView. I don’t expect this to change but I could see efforts like Lumen (Elixir to WASM compiler) or Gleam (targets the BEAM and JS) make it potentially possible to build some shared state management code for both client and server but that’s a far ways off if it ever happens. The gains you get from shifting state and much of the interactivity to the server in terms of deduplication, security aspects and simplicity comes with the trade-off that it isn’t on the client. There’s nothing good about this and there is no big point in dancing around it. There are potential ways of building on top of LiveView and the JS integration to deliver something that mixes this together but you’d be off in the wilds with a machete at that point. If you need to make an offline-first Progressive Web App or similar you should either not use LiveView or only use LiveView for the parts that don’t make sense offline.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |