pinetops
Livex: A working DX Experiment in potential LiveView enhancements - Could we see some of these features added to LiveView?
LiveView is by far my favorite web tech, but a few things have been nagging me. So with all the fancy and ill advised elixir tricks I could muster I got LiveView to do some new things:
tl;dr - Automatic client side state management (including for components), a tightened up render → reducer cycle, and custom events makes for a rather different, more functional React like programming experience. Gets rid of most uses of mount, handle_params, handle_event and push_patch in favor of a more declarative style.
Not production code, but an experiment in what if we had an interesting combination of new features? Would it make a difference to us? Could we see some of these features eventually added to LiveView, or at least implementable with less high-wire activity than I had to use.
Most Liked
pinetops
In the first instance it’s for me (and any other interested person) to discover whether putting some of these improvements together meaningfully improves the DX.
I’ll be submitting the first small PR soon (assign_new with deps), and so I’ll learn more about whether there’s any enthusiasm from the maintainers for this sort of direction.
avi-turetsky
Just wanted to chime in and say this looks great. FWIW there’s been a push in the frontend world to move client state into the url as well. I feel like this has been the one justified criticism of LiveView in the past (not all state needs to live on the server and incur a roundtrip latency cost). Having a declarative way of managing it would open the door for alot of use cases where folks would otherwise reach for a spa.
BartOtten
This is some impressive work which at a glance seems highly useful! I see how this would help (React) developers to make the step to LiveView.
Greatly appreciated ![]()
Popular in Proposals: Ideas
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









