Take a look in your lib/my_app_web.ex, specifically at the :controller and live_view helpers. If you wanted your live views to use live.html.heex for live views, then you would chang
use Phoenix.LiveView, layout: {MyAppWeb.Layouts, :app}
to
use Phoenix.LiveView, layout: {MyAppWeb.Layouts, :live}
and create live.html.heex in lib/my_app_web/components/layouts/.
The root layout is specified in the router (look for put_root_layout).
Really the docs I link do a good job of explaining the difference between root and app layouts (live is considered an “app” layout), especially the last paragraph:
At this point, you may be wondering, why does Phoenix have two layouts?
First of all, it gives us flexibility. In practice, we will hardly have multiple root layouts, as they often contain only HTML headers. This allows us to focus on different application layouts with only the parts that changes between them. Second of all, Phoenix ships with a feature called LiveView, which allows us to build rich and real-time user experiences with server-rendered HTML. LiveView is capable of dynamically changing the contents of the page, but it only ever changes the app layout, never the root layout. We will learn about LiveView in future guides.






















