Check again web components specification and all the resources around the web from google, stencil, and open web components. React and web components can't be swapped because they do a different thing. Web components are made to extend HTML and to make new leaf elements, not applications or big components. They should be simple, add functionalities to HTML elements and use composition (one of the core concept of HTML).
Sounds to me like what reactjs wanted to be an ui framework to for creating components.
ReactJS has no data layer that's why we need things like Redux etc.
Maybe it now has something with hooks but I think it is still to early to say.
React can't create custom elements or extend the built in ones. React, as an abstraction layer can of course handle their components, but they're just logical containers that render html elements. Web components are THE html elements you should render inside react, as for the built in ones.
So I could argue both ways.
Why then not use react fully? Or why not use web components fully?
You can use react fully, but you will have the react dependency. Wc are framework agnostic with no dependencies if you use vanilla js. With react you can't create or extend native html elements, (this is the point of web components) you can just use then the html elements you have and combine them to build a new widget. While with web components you can't build apps or complex things because you work directly with the platform api. They are on a different abstraction layer, as I said here:
Okay, thanks for the link!
I will read it!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.