Remix.run Logo
diiiimaaaa 11 hours ago

Not only that.

My main problem with web components that you end up with a build step anyway.

Not every component is interactive and relies on JS, some are just static elements (say avatar image) that you wanna render right away (but at the same time keep styles and logic scoped). Declarative shadow DOM helps, but you end up with a bunch of duplicate code in your final output, which begs the question - why am I using web components at all.

indolering 5 hours ago | parent | next [-]

Because that was around the time they stopped developing high level APIs to focus on lower level constructs. They wanted to build the primordial ooze from which you would build ui frameworks.

But it turns out that those layers of indirection have made the web platform just another build target. It's just like how they never added optional types to JavaScript and now TypeScript is the de-facto standard.

And now I'm stuck managing layers of indirection and compiler settings and debugging in nearly the same but /slightly/ different code than what I programmed in.

Their logic is that if it can be done using a compiler or on the server side, then why bother doing it in the platform? Which is partially true: I want a compile step to optimize everything. But there is room in-between and this is often just an excuse to ignore dev UX entirely.

IgorPartola 3 hours ago | parent [-]

Isn’t that just a tooling problem? We use C/Rust/Java and compile to a completely different representation and it works just fine. When was the last time you had to write C or Rust and then debug stuff in assembly?

WickyNilliams 7 hours ago | parent | prev [-]

Do you not end up with duplicate code when rendering `<SomeReactComponent />` multiple times?