HTML
Set of utilities to create components from cached tagged templates. Inspired and influenced by @trusktr
Unlike HTML, attributes, tags and components are case sensitive. The html function matches the use of JSX.
# Snippet
# Value
# Defining a Global User Component
# Defining a Local User Component
# Predefined Components
# htmlEffect
An htmlEffect is similar to a regular effect. It creates and cache the html for the output updating anything that has changed using signals for the interpolated values. Updates trigger automatically when using reactive values.
# Notes
- children as an attribute will be used as long as the node doesnt have any childNodes (just like in JSX). It must be totally empty, or else the children attribute will be ignored
- on html.define the registry is case sensitive
- on html.define it is possible to define a component named div, and make all divs behave differently. This is a warning, not a recommendation.
# No JSX
Making a tagged component
# Reactive Tagged Template
Making a reactive tagged template without using JSX
# Reactive Tagged Template With JSX
Making a reactive tagged template that uses JSX
# Custom Component
Making a custom component
# Show Off
Testing the Show component
# Nested Show
Nesting components with callbacks
# Attributes test
Attributes and properties
# Two html
One calling the other
# Custom Element
When is called the custom element constructor?
# Context
Display context value while nested
# Custom Element
Custom Element Tracking Test