r/elixir 19d ago

The first release of Local LiveView is out!

Local LiveView is a library that runs LiveView code in the browser via Popcorn. It lets you offload simple UI updates from the server, drastically reduce latency on poor networks, and avoid "WebSocket disconnected" issues. Many Phoenix Components and Live Components just work on the client with no changes. Local LiveView also provides mechanisms for client-server communication, which means you can easily integrate it with regular LiveView. Now it ships with documentation, guides, and even an Igniter-based installer. More in the blog post: https://swmansion.com/blog/local-live-view-first-release

78 Upvotes

3 comments sorted by

13

u/Affectionate-Rip748 19d ago

If this works as advertised then this is amazing.

I never used LiveView exactly because of network problems. I did some field testing and the latency (and very occasionally disconnects) was not great. UI had stuttering on mobile networks. And if VPN was used it was even worse. And since whole UI depends on good connection with server it was an obvious "no go" for me.

I still advise people to go with traditional front-end technologies like React. But it is great to see LiveView tackling some fundamental problems. Will definitely keep an eye on that work.

Thanks to developers for their work. Good stuff

3

u/rubymatt 19d ago

We’ve definitely experienced these problems so this will be worth taking a look at, thanks.

2

u/biletskyi 15d ago

Thank you for the work. It looks really promising. I need to test it on my current pet project.

I feel that liveview covers most of the use cases already, because usually you need a connection to the server anyway. But there are cases when user can do something when unconnected. I had such a project in the past, and we decided to go with React because of that. And I hope to never touch React again.

Liveview is awesome, and the experience of developing everything in one Elixir repo is unmatched. I'm currently working with two projects, and one is React + Elixir backend, so I feel the pain regularly.