In this section, we're going to look at a number of examples of web components that I've built for projects over the last four years. They're not all using best practices — I was learning myself, during much of this time — but that's valuable in itself. These are all real-world examples, and I will try to point out the places where something worked well, as well as where it didn't, so that you can learn from both.
In each chapter, we'll open with a brief introduction to establish context, followed by the complete source code of the component. Finally, I'll walk through individual methods or interesting features that might be confusing or counterintuitive.