0.0.3 • Published 1 year ago

it-aint-much v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

it-aint-much

Collection of tiny helper functions for DOM manipulation combined with Preact signals.

import { html, signal, addEvent, qs, bindText } from "it-aint-much";

const Counter = () => {
  const count = signal(0);

  const root = html`<div>
    <h1>Counter</h1>
    <div id="display"></div>
    <button>+</button>
  </div>`;

  addEvent(qs(root, "button"), "click", () => {
    count.value++;
  });
  bindText(qs(root, "#display"), () => count.value);

  return root;
};

container.append(Counter());
0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago