Cookbook / Counter
Counter
displayMinimal reactive counter — prop-backed count with increment/decrement/reset actions.
- id
- aihu-counter
- since
- 0.5.0
- file
- aihu-counter.aihu
propactionon:clickinterpolation
Run it
live · runnableThe real, compiled aihu-counter.aihu component, hydrated as an island right here — fully interactive.
Requires
- concerns
stateevents
Anti-patterns
- Do not reach for state() when the value is part of the component's public surface — prop() makes it host-settable and attribute-visible.