You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike LiveView's render/1 callback, a function component can
modify the assigns it receives via the assign/2, assign/3, assign_new/3, and update/3 functions. Therefore, you can assign
the computed values before declaring your template.
Expected behavior
Cleanly you can:
def render(assigns) do
assigns = assign(assigns, :foo, 123)
~H"""
<%= @foo %>
"""
end
Environment
LiveView Docs v1.0.0-rc.0
Actual behavior
The docs says:
Expected behavior
Cleanly you can:
I think that should just be removed from the docs? See https://elixirforum.com/t/reassigning-assigns-in-render/64038/3 for context
The text was updated successfully, but these errors were encountered: