rawact icon indicating copy to clipboard operation
rawact copied to clipboard

Writing Web components is simpler that write React components.

Open trusktr opened this issue 5 years ago • 6 comments

README says

Writing React.js components is simpler than writing native DOM code.

Have a look at some of the winning libraries in the Stefan Krause benchmarks.

Some of the fastest ones are both faster and better DX than React.

trusktr avatar Nov 09 '18 04:11 trusktr

"easier" here is subjective,

MaybeRex avatar Nov 09 '18 06:11 MaybeRex

I'm not saying there are not alternative ways of archiving the same results. This tools is targeted towards React.js developers, that may want to optimize their existing application without rewriting it to another framework.

sokra avatar Nov 09 '18 09:11 sokra

@trusktr Your argument is very subjective. React wins for me , at least in the ease of development. If you want to talk about performance, you might be correct, but not the simplicity of React in comparison with many other libraries/frameworks. And, there're many React devs out there, why would they use React if they found React is harder than , for example, Angular ?

revskill10 avatar Nov 09 '18 16:11 revskill10

I think the "Web Components Simpler" over simplifies the problem. On the surface yes, as React has more specificities that are present because of technology decisions that are unnecessary when you move to actual DOM. But just picking up Web Components isn't going to give you what you need to the same level of sophistication. You are still likely picking up a different library that you are learning.

I understand the motivation for this project. I think there is a real audience for it. As the author of one of those aforementioned libraries in that Benchmark that uses Real DOM with React-like syntax it is not a swap in. I chose to solve the problem a different way by easing them into using my library's constructs while still using React before making the choice to migrate off. But it's all work. I think for people looking for a quick switch this idea seems very promising. They get to keep their existing React.

I do think there is a critical question here whether the full abstraction makes sense after migrating this way. And the quoted statement in the ReadMe might seem a bit inflammatory to some, but it's marketing and I have no qualms with similar statements made the opposite way about React's many Lifecycle methods.

ryansolid avatar Nov 09 '18 17:11 ryansolid

IMO Web Components are far from a good developer experience compared to React. I wrote about what I'd change in WC v2 here: https://tbranyen.com/post/web-components-v2-wish-list

I see a lot of folks claim WC are simplier than React, but that completely misses the point, since they are basically the functional equivalent of Backbone when it comes to the thing that matters: rendering.

tbranyen avatar Nov 09 '18 17:11 tbranyen

Did you tried stenciljs? Good framework to write pure webcomponents. Similar to reactjs

FDiskas avatar Nov 28 '19 15:11 FDiskas