I tend to follow your first snippet. I share your sentiment about wanting view functions to feel more like the resulting HTML. In general, my opinion is to use |> for data transformations and use parentheses and the occasional <| for view logic. It might feel even better if you just pull the items |> ... part into its own value so that you don’t have to use the parens at all. I’ve found that writing view functions that way helps me and my team understand the HTML hierarchy better and visualize the results.
2 Likes