Counter · signals

0

Usage

JavaScript
import { signal, html } from "./index.js"; const count = signal(0); // drop a signal straight into a hole — the text node auto-tracks it,// the component never re-runs.html`  <button onclick=${() => count.update((c) => c - 1)}></button>  <span>${count}</span>  <button onclick=${() => count.update((c) => c + 1)}>+</button>`