The concept of reusability
Before we even dive into the concept of reusability in Web Components, let's take a look at what reusability is with the help of an example. Let's take an example of an operating system, say Windows 10. Now, we all know there are a lot of computers. Some with the same hardware and some with different. But what makes this piece of software (Windows 10) reusable is its ability to being used again and again and in different scenarios without any issues. The exact same thing can be made to work for a Web Component.
Yes, Web Components can be made extremely reusable. Let's say we have a Web Component <custom-header>. As the name indicates, it is a header. And most of the sites that we have ever visited have one or the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access