© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
J. KrauseDeveloping Web Components with TypeScripthttps://doi.org/10.1007/978-1-4842-6840-7_9

9. Professional Components

Jörg Krause1  
(1)
Berlin, Berlin, Germany
 

To further reduce the amount of code for Web Components I suggest some smart enhancements. By using decorators you can make the code even easier to read. That’s the power of TypeScript. All examples in this chapter are written in TypeScript.

Before you start reading this chapter, it’s recommended to get familiar with decorators in JavaScript and TypeScript.

Smart Selectors

When you work with the DOM, you often need to use querySelector and querySelectorAll. Most of the dynamics of components are in ...

Get Developing Web Components with TypeScript: Native Web Development Using Thin Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.