Book Image

Getting Started with Web Components

By : Prateek Jadhwani
Book Image

Getting Started with Web Components

By: Prateek Jadhwani

Overview of this book

Web Components are a set of APIs that help you build reusable UI modules that can operate in any modern browser using just Vanilla JavaScript. The power of Web Components lies in their ability to build frontend web applications with or without web frameworks. With this practical guide, you will understand how Web Components can help you build reusable UI components for your modern web apps. The book starts by explaining the fundamentals of Web Components' design and strategies for using them in your existing frontend web projects. You will also learn how to use JavaScript libraries such as Polymer.js and Stencil.js for building practical components. As you progress, you will build a single-page application using only Web Components to fully realize their potential. This practical guide demonstrates how to work with Shadow DOM and custom elements to build the standard components of a web application. Toward the end of the book, you will learn how to integrate Web Components with standard web frameworks to help you manage large-scale web applications. By the end of this book, you will have learned about the capabilities of Web Components in building custom elements and have the necessary skills for building a reusable UI for your web applications.
Table of Contents (14 chapters)
Title Page
7
Implementing Web Components using Polymer and Stencil

Summary

In this chapter, we looked into how we can integrate Web Components into already-existing projects that use some of the most famous libraries/frameworks in the frontend world. We learned how to add an existing web component built using Vanilla JavaScript to a React, Angular, or Vue project. The techniques learned in this chapter can be used with any framework or library and in any type of existing project. The inclusion of Web Components in already-existing projects is also a good use case for the quick prototyping of features, and the components can even be removed as soon as their work is done. 

I hope that this chapter was useful in helping you create better web applications, whether they use Web Components or not.