Hacker News new | past | comments | ask | show | jobs | submit login

It is actually not "done better". Web Components have shadow DOM, which permits scoped CSS. React Components are brittle because styles and scripts are global. Also, some people think you can only pass strings as attributes to Web Components. This is not true; you can pass objects just like in React. Also, Web Components are declarative not imperative, again like React.



I didn't mean "done better" as an absolutist statement, but I can understand why it would be read that way. I meant it more as a brand statement, obviously the React team, contributors and users are likely to believe it's better. I get that some will come down on the other side of that coin.

I stand by the statement that the competition between these two projects is good for the web which I think is the important part of my response to the parent comment. I'm glad there are people working with and on web components.


What is the point of open standards if everyone competes against the open standard as opposed to supporting the standard?


Facebook isn't "everyone". As I noted in the comment to which you're replying, there are people building and using Web Components.

Nothing about Facebook creating React prevents browser vendors from implementing Web Components natively. React uses other open standards (ECMA & HTML) which have existed for a decade previous to Web Components.

Web Components contains good ideas. React contains good ideas. You're arguing against people who are helping. Stop doing that.


Somehow I think the reaction would be different if Microsoft had done this, i.e., make proprietary competing technology instead of supporting an open standard. (Yes, React is proprietary--look into the patent rider issue.)


Yes but you didn't dispute his major point of server-side rendering.


You can uses this to do server-side rendering: https://github.com/pimterry/server-components




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: