it-aint-much
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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());

Readme

Keywords

Package Sidebar

Install

npm i it-aint-much

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

122 kB

Total Files

26

Last publish

Collaborators

  • dusanjovanov