sinuous

by luwes

HTML

<script type="module">
import { o, html } from "https://unpkg.com/sinuous?module";

function Profile() {
  const s = o({
  	c: 0
  });
  return html`
  <div>
   <button onclick=${() => s({ c: s().c - 1 }) }>-</button>
    ${() => s().c}
   <button onclick=${() => s({ c: s().c + 1 }) }>+</button>
   </div>
  `;
}

document.body.append(
  html`
    ${Profile()}
    ${Profile()}
    ${Profile()}
  `
);
</script>