@exchangedevlab/ui
v1.2.0
Published
Dependency-free UI library with a React-style hooks API and html`` templates
Readme
@exchangedevlab/ui
React-style UI library without dependencies or a build step: hooks (useState, useEffect, useMemo, useRef, useSyncExternalStore, …), memo, createRoot, and JSX-like html tagged templates.
import { createRoot, html, useState } from "@exchangedevlab/ui";
function Counter() {
const [n, setN] = useState(0);
return html`<button onClick=${() => setN(n + 1)}>clicked ${n}</button>`;
}
createRoot(document.getElementById("root")).render(html`<${Counter} />`);No innerHTML anywhere; dangerouslySetInnerHTML throws; URL attributes accept only safe schemes (checked with @exchangedevlab/core/url, which normalises like browsers do).
One dependency: @exchangedevlab/core (same repository, same review). No install scripts. Source and review notes: https://github.com/robinhood-apply/vetted-packages
