That makes sense!
It should work with the capture:
def story_card(assigns) do
~H"""
...
<li :for={author <- @authors}>
<a phx-click={@on_author_click.(author)}>...</a>
</li>
...
"""
end
def render(assigns) do
~H"""
<.story_card
authors={@authors}
on_author_click={&JS.push("some_event", value: %{author: &1})}
/>
"""
end
(sorry I forgot the @ in my original example)
Possibly you already got that but I wasn’t sure from your response ![]()






















