1. 8
    1. 7

      It seems like an unfortunate direction to me. While function components, slots etc. are totally fine, this attempt to hybridise Elixir and HTML syntax in such a piecemeal way means that for the sake of saving a few characters you have to learn this non-portable mini-language (which will probably keep growing in this ad hoc way). You’ll also inevitably end up with a messy mix of these pseudo-attributes and regular HEEX.

      1. 2

        that is a good point. It does beg the question, at what point will the frontend part of liveview just become its own DSL for manipulating html while “not using javascript”?

        1. 2

          Interestingly, we already have a DSL that specifically wraps JS (Phoenix.LiveView.JS) so we can use JS while not using JS ;)

          I’d say HEEX is the DSL for manipulating HTML, and now we’re getting this third DSL which is redundant and is stuck into HTML attributes just to make it even more awkward.

    2. 5

      The new LiveView release has a lot of cool new html template features to simplify code.

      For example, turning this template:

      <tbody id="books">
        <%= for book <- @books %>
          <%= if book.available do %>
             <td><%= book.title %></td>
          <% end %>
        <% end %>

      into this:

        <li :for="{book" <- @books} :if="{book.available}"><%= book.title %></li>

      I’ve really been enjoying the things I’ve build with LiveView, and it keeps getting better. The only tough part, which can be very frustrating, is that since it’s not 1.0, things can break with new upgrades. But, overall, I really enjoy the experience.