Custom HTML Elements
Last Updated 30 Nov, 2023
Introduction
My favorite feature of ES6+ is Custom HTML Elements. Custom Elements allow us to extend HTML for React-Like components without the need for preprocessors or compilers. There are fewer things "out of the box" for these components, but that means they can be lighter and more readable than react.
You can use these components as you would any other html elements. Each component needs a dash in its name. So
<componentelement></componentelement>
is not valid, but
<component-element></component-element>
is.