PJUllrich
Author of Building Table Views with Phoenix LiveView
Recently, I completed a first product with Phoenix LiveView and ran into the classical problem that it became unclear how, when and from where the State of the UI was changing. Facebook tackled this problem by developing the Flux pattern, which was adopted by every major SPA Framework out there (e.g. Redux, Vuex, Ng-Redux). I took the time to write an example Framework/Module that tries to replicate the Flux pattern inspired by how Vuex was implemented. I created an Example repository here. The core logic can be found here. Your opinion on the usefulness of such a library and comments/improvement suggestions on the implementation are most appreciated ![]()
Trending in Discussions
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
wolfiton
Hello,
I think that
MUTATIONSmutate, shouldn’t be used in your code because they are terms associated with graphql(absinthe) ecosystem and a lot of people will get confused.It may even have conflicts.
I hope you found this info useful.
Good luck with your project..
PJUllrich
Thanks @wolfiton, however the naming convention is given by the Vuex flux flow. Unless somebody uses these 2 libraries side-to-side, I don’t expect the naming will be confusing though since the application contexts are quite different.
PJUllrich
So, 2 major things happened since I started this thread:
I finished a first implementation of LiveEx - a state management library for Phoenix LiveView. Please check it out and comment, recommend, contribute to it
I wrote on Medium about how to use the library. Hopefully, this article clears up what the flux pattern is, why it might be important for LiveView, and how to use the LiveEx dependency.
Also, some other cool things happened:
Chris McCord pointed out the
assign_new/3function to share parent state with child LiveViews. I will look further into this function and will check out how to use it in LiveEx.Guido Tripaliresponded to my Medium article and suggested to bring the discussion about how to manage state to this forum.
I would like to pick up Guidos suggestion and start a discussion about what you think about how state can be managed best between nested LiveViews. A couple of questions to start with:
I’m curious about your answers
AndyL
IMO state management should (eventually) be baked into LiveView itself. With React, navigating the many flavors of 3rd party Flux libraries has been a productivity killer.
gts
just to give out a sign of life! After commenting your article on Medium I’ve start writing my thoughts about the status handling, but I realised that it will take me much more time to elaborate a satisfactory analysis to share with all of you here, because the matter have complex structure and maybe can be useful to have a sort of ontology of which are the actions, the events and the states involved in a typical full Phoenix app.
egze
Very cool library. I’ll be following the development.
PJUllrich
I agree with you. At least a certain combination like React/Redux should become a standard so that the decision making effort is mitigated.
PJUllrich
Looking forward to your findings
PJUllrich
Thanks! Feel free to test it and potentially contribute
aarkhipov
Does current implementation assume that there is a single root LiveView for the whole app, and all routes are implemented via child live views?
I mean, if I want a global state shared between all live views.
For now there is a one-to-one mapping between a store and a root LiveView, and if I have something like
live "/one", OneLiveView; live "/two", TwoLiveView, live viewsOne*&Two*will get different stores and state will not be shared between them, right?Also, in the readme I found a notion of
feature/integrate-genserverbranch, which seems capable to share state between live views, but I haven’t found the branch itself, has it been removed for some reason?