Additionnal code for assigns with embed_templates

How do you manipulate assigns when the component has sigil_H in embed templates ?

def fun(assigns) do

assigns = assign_new(assigns, :newkey, fn → .function of other assigns end)

~H"“”

“”"

end

where as with embed_templates there is no room for code between def and ~H

3 Likes