3 ms·
I recently started to only use liveviews for any page. Yes, I could do a simple controller/template combo, but then after some time comes the feature request fo
by anonyfox 3y ago
I recently started to only use liveviews for any page. Yes, I could do a simple controller/template combo, but then after some time comes the feature request for some interactivity, and I have to convert the page to LV manually. Or something like the global navbar needs some dynamic thing, and here you go: either embed a LV in the static page or... do nothing since all pages are LV to begin with. The overhead is pretty minimal IMO, a simple LV that does nothing is a few lines of module code, not much more than a controller route. And by standardizing this (no more deadviews), pipelines/plugs can be simplified, and live_session for seamless navigation becomes much better. Phoenix Deadviews render within a few MS, but still a live_navigate is snappier.
- arcanemachiner 3y agoI agree with the GP, but I've definitely been staring down the barrel of this paradigm as well.