After a long period without doing anything related to Elixir/Phoenix I came back and just upgraded a former project to Phoenix 1.6. Many things have changed but I’m starting to get used to things again at my own pace. ^^
Now I’m using
heex templates and even added the
HEEx HTML Formatter as plugin to
I see that this formatter plugin will add parentheses to any function call inside
<%= render “edit_profile.html”, some_func(assigns) %>
<%= render(“edit_profile.html”, some_func(assigns)) %>
Personnally I find the first synthax prettier and less cumbersome.
And also when I used generators like
phx.gen.auth they adopt the first style as well.
So my actual question is:
Is it just a matter of preference or is there a synthax that is encouraged or recommended inside templates?