Today we’ll look at how to wrap React components using Custom Elements, allowing us to interop with Web Component-based libraries using the DOM as a simple configuration API. Similar to libraries like Polymer, React cares about composition, lifecycle events and modularity so seeing how well it fits with Web Components is an interesting thought experiment.
As React doesn’t need to take over your whole app and components built with it can comfortably live inside existing ones, you may indeed run into situations where component built with different libraries need to both co-exist and interop.
Your new post is loading...