Code reuse is the mantra of development. We strive to create a code snippet that encapsulates its functionality, serves as a solution to a single problem or use case. In web development, we might want to create a custom element that has its own style, own script and own markup. This custom element should be reusable across the web. i.e. websites and web apps.
Web Components help us deliver this and more! They are a set of web platform APIs that help us create custom HTML tags with associated style and script. They can work across browsers and can be used with any JavaScript library or framework that works with HTML.

#shadow-dom #javascript #html #web-components

Introduction to Web Components
1.35 GEEK