3 ms·
The author does not even try to make arguments about what makes React bad and Web components good. I expected some strong opinions about this backed by performa
by zahinomaralwa 10y ago
The author does not even try to make arguments about what makes React bad and Web components good.
I expected some strong opinions about this backed by performance benchmarks but all the author cares about is saying that React is bad because it is not a web standard and it was made to fight with google for best engineers!
Really, i failed to see it.
We, at AdPushup, chose React for Visual Editor and i can give many reasons as its justification.
- One way data binding flow (Much easier to learn, implement and debug as compared to more traditional two-way data binding, not to mention Cascading MVC updates that decreases your productivity by a fair margin)
- View render is independent of component state
- render() encapsulates component's every possible UI state
- True reusable components, we have been using many of them in our Visual Editor
- ViewModel is nothing but just an object literal that lives in every component, only if needed. So, no View can be more 'decoupled' with its model.
Further, React docs themselves talk about how React can be mix-and-match with Web Components and both of them are built to solve different problems.
An excerpt from this comment section:
In the second half of the article, the author argues that we should prefer Web Components to React, which is like comparing apples to barrels.
https://facebook.github.io/react/docs/webcomponents.html https://facebook.github.io/react/docs/webcomponents.html
> Trying to compare and contrast React with WebComponents inevitably results in specious conclusions, because the two libraries are built to solve different problems. WebComponents provide strong encapsulation for reusable components, while React provides a declarative library that keeps the DOM in sync with your data. The two goals are complementary; engineers can mix-and-match the technologies. As a developer, you are free to use React in your WebComponents, or to use WebComponents in React, or both.