by flowerlad · 7y ago · 0 comments
Using React for data fetching and animations seems like a bad idea, it is not the best tool for the job.
React is popular today, tomorrow it may be View, then there will be something else. If you can write reusable components that work in all of todays frameworks and tomorrows, while sticking to standards, while taking advantage of things like Shadow DOM, why would you still limit yourself to React? I am not saying the entire application should be a Web Component, but certainly reusable parts should be written as Web Components so that they can work in all your applications even if they don’t all use the same framework and in future applications that use yet-to-be-invented framework.
I mean a collections of components like Polymer. Unless you plan on maintaining everything yourself, both React and Web Components share the same problem here.
> This universal compatibility and better reliability makes Web Components a better choice today for creating reusable components, than React.
You can mix and match any and all frameworks and Web Components if you try want. And again: React and Web Components mostly solve different problems. One isn’t going to directly cannibalise the other. You can use both.