In short, the body is defined from the heex template via macro magic.
A hint is that it’s not just missing and end but also a do. Maybe it’s too much info for now but a more “normal” example of this syntax in the wild is when defining multiple function heads that have a default pameter(s):
def foo(a, b \\ [])
def foo(:bar, b) do
["bar" | b]
end
def foo(:baz, b) do
["baz" | b]
end
Hey, it’s cool. It can be overwhelming at first, and I agree it’s odd syntax to come across when first learning the language. That’s all part of what this forum is for!