Surface Component compilation error - no match of right hand side


I am trying to use a Surface.Component in my live.html.heex but get the following error:

== Compilation error in file lib/met_opto_web/views/layout_view.ex ==
** (MatchError) no match of right hand side value: {:tag_open, "SideMenu", [{"side_menu", {:expr, "@side_menu", %{column: 34, line: 80}}}], %{column: 13, line: 80, self_close: true}}

I have confirmed that all of the assigns are in place and I am able to render the component in a page.html.heex using a page.ex liveview.

Is there something stopping the use of Surface.Components in templates?

Thanks in advance.


I think, nothing has changed since then, see around post 169

OK, thank you.

Luckily we have Phoenix.Component now :slight_smile:

yes, of course, a lot of things are moving from surface to live_view, maybe that’s the reason Marlus is very busy at the moment.

Yep, I have come a bit late to Surface but it is fantastic

Delete the live.html.heex, build a layout component in its place, use that in your liveviews and live free :grinning: