Options for automatically rendered HEEx?

1.7.0-rc wouldn’t let me designate or configure a *.heex for a LiveView. It automatically takes <module_name>.html.heex but it’s no use when I name LiveViews like Foo.Live. Because all LiveViews will look for live.html.heex. I’m acknowledged a work-around. But shouldn’t it be configurable directly? Should I open an issue on the repo?

This is what the work-around looks like

  embed_templates "*"

  def render(assigns) do
    extra = assigns_to_attributes(assigns)
    assigns = assign(assigns, :extra, extra)

    <.foo @{extra} />

Initial question and the answer by Doughsay : Discord

1 Like