Overview:
The component-elements package allows users to use an HTML custom element as the root for their components. It also provides the option to use async code resolution if the custom element is not immediately used, which can help reduce code weight.
Features:
- HTML custom element usage: Users can use an HTML custom element as the root for their components.
- Async code resolution: The package allows the use of async code resolution if the custom element is not immediately used, helping to reduce code weight.
Installation:
To install the component-elements package, follow these steps based on your component library:
For Preact:
npm install preactement
For React:
npm install reactement
For Vue:
Component elements are supported natively in Vue, so no specific package is required.
Summary:
The component-elements package provides developers with the ability to use HTML custom elements as the root for their components. It also offers the option to use async code resolution to reduce code weight. The package is inspired by preact-custom-element and is built as a solution to slightly different needs, while also serving as a learning exercise.