...

/

Introduction to DOM Elements and Polymorphic Components

Introduction to DOM Elements and Polymorphic Components

Learn about the abstraction and polymorphism for optimizing web component development.

Component abstraction

In most of the larger applications and projects we’ve worked on, we often build many supersets or abstraction components on top of the standard HTML elements. Some examples include custom button elements that might take a prop defining whether or not that button should be primary or secondary, or maybe one that indicates that it will invoke a dangerous action, such as deleting or removing an item from the database. We still want our button to have all the properties of a button and the props we want to add to it.

Another ...