Hi all,
I have just updated my Phoenix project in order to support LiveView.
I have one problem with the render function:
either I write the render function or I use the naming convention to take the html.leex file I receive the same error:
expected MyWebApp.LayoutView to return a %Phoenix.LiveView.Rendered{} struct
Ensure your render function uses ~L, or your eex template uses the .leex extension.
Got:
{:safe, ["<main role=\"main\" class=\"container\">\r\n <p class=\"alert alert-info\" role=\"alert\"\r\n phx-click=\"lv:clear-flash\"\r\n phx-value-key=\"info\">", "", "</p>\r\n\r\n <p class=\"alert alert-danger\" role=\"alert\"\r\n phx-click=\"lv:clear-flash\"\r\n phx-value-key=\"error\">", "", "</p>\r\n\r\n", ["<h1>Memorize This:</h1>\n"], "</main>\r\n"]}
my render function
@impl true
def render(assigns) do
~L"""
<h1>Memorize This:</h1>
"""
end
any suggestion?
Thanks in advance