Post

Honestly it's actually not bad, I'm exaggerating 😊 It's a super well-built library that solves a painful problem well. I actually love it for many things. But like all abstractions, it introduces another layer between the programmer.

It reminds me a lot of abstracting styling with CSS vs using Tailwind utility classes. Tailwind is appealing to me because it colocates markup + styling. You can look at a chunk of HTML and know exactly what it's doing. It may look messy, but I never have to go find & reverse engineer other files.

0 reposts0 likes

Working with abstracted CSS (i.e. class names for components) increases cognitive load because I often have to think about the required DOM structure (usually referencing an existing example), how the CSS actually works, and how changes to the CSS could cascade to (and break) other parts of the app.

ViewComponents feel similar to abstracted CSS because I can't just look at a ViewComponent and understand exactly what it's doing. Which (like abstracted CSS) is fine for simple things but can quickly become unwieldy. No idea if this makes sense, I'm on a lot of cold medication at the moment 🤣

Oh don’t get me wrong, this isn’t a love story about partials & helpers 🤣 haven’t tried phlex but have been meaning to for exactly this reason. One file, one language.