4 ms·
Out of curiosity, what difficulties have you faced with Elixir LiveView? I am developing in it right now, and am enjoying managing state and interactivity in on
by pandatigox 2y ago
Out of curiosity, what difficulties have you faced with Elixir LiveView? I am developing in it right now, and am enjoying managing state and interactivity in one codebase (I like how everything is channeled through the socket).
Has your experience been more negative?
- oefrha 2y agoIf you handle all interactivity server side so that the user can’t do anything at all without a round trip, sure. It’s just a terrible app for users with latency/patchy connectivity. As soon as you try to mix in slightly nontrivial client local state and transforms it becomes the most retarded JS imaginable.
- bcardarella 2y agoThis is the common misconception of LiveView coming from the JS community. LiveView is JS. It has a whole optimistic UI layer that solves all of the problems you cite. The UI from state updates coming from the server or the client doesn't matter because the reactive UIs of SPAs still require data updates from some remote source. So if we're talking about latency that latency is going to exist for all application types.
- oefrha 2y agoWhere did I say it’s not JS? I said it becomes the most retarded JS imaginable. I have used the “whole optimistic UI layer”, hooks and commands. What happens is local diffs have to fight server sent diffs, at every level, resulting in more tangled logic than jQuery apps. This does not happen when you merely have to merge state and the view is a pure function of state.
- tobyhinloopen 2y agoMy primary complaint is that it is hard to test (compared to "stateless" pages) and that the whole thing feels complicated. I also feel like the learning curve is pretty steep and you can't just have a random, experienced non-Elixir dev join the project and have them fix something. They must be comfortable with Elixir & Phoenix before they get productive. I feel like it is multiple layers of complexity and uncommon patterns. Other than that, I think it is very cool. I have very strong mixed feelings about the feature hah.