I have started developping with Liveview 0.5.1 and recently switched to 0.10.1
I don’t understand well the changelog :" (…)Therefore, we recommend setting put_root_layout
in a pipeline that is exclusive to LiveViews"
I understand that root layout is top-level, shared among live and no-live views. The changelog seems to say that that should no longer be the case. If I put put_root_layout to a LiveView dedicated pipeline, it won’t be set for regular view pipe-lines, meaning regular views won’t have a root layout anymore.
Since I could not make my mind with doc and changelog, I went away and altered my code until it “worked accidentely”.
Please tell me if what I did is correct.
1/I set
plug :put_root_layout, {MsimWeb.LayoutView, :root}
in the main pipeline in router.ex
2/My previously empty root.html.eex now contains whatever was in app.html.eex, and I changed the render… to @inner_content
3/My app.html.eex is now almost empty, it has a one line render…
4/ My previously empty live.html has now few lines about live_flash and is called by altering each liveview file with
use Phoenix.LiveView, layout: {MsimWeb.LayoutView, “live.html”}
Thanks for your help