Programming Phoenix LiveView B8: use PentoWeb, :live_view (page 16)

B8

defmodule PentoWeb.WrongLive do
  use Phoenix.LiveView, layout: {PentoWeb.LayoutView, "live.html"}

Suggestion

defmodule PentoWeb.WrongLive do
  use PentoWeb, :live_view

https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-example
On page 26 Give It a Try, we can use Routes.live_patch .

Hope this helps.

1 Like