What problem does it solve?
This Skill helps you bind reactive signal state into the DOM without accidentally freezing updates into static values. It explains how to keep text, attributes, and template output live while choosing the right level of reactivity for each situation.
Core Features & Use Cases
- Text and Children Binding: Pass signals directly into DOM children so text updates stay fine-grained and do not re-render surrounding structure.
- Attribute Binding: Bind signals into style, class, and other attributes so UI state changes propagate automatically and predictably.
- Function Children and Computed Values: Use function children or computed values when the structure itself needs to change, such as conditional layouts or swapped components.
- Custom Element Rendering: Choose between raw attribute values and reactive accessors inside defineElement render logic based on whether you want coarse-grained logic or fine-grained DOM updates.
- Use Case: A counter, theme switcher, or conditional panel can stay responsive without manual DOM updates, as long as reactive values are passed in the correct form.
Quick Start
Use the signal-binding skill to determine whether a value should be passed as a signal, a computed result, or a function child so the DOM remains reactive.