npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ilha

v0.14.1

Published

Generator-first island UI on Effect

Readme

ilha

A tiny, isomorphic UI library. You write a function component, declare atom() values, and render with JSX. Runs in the browser with signal reactivity and on the server as HTML. Powered by Effect — no virtual DOM, no compiler.


Installation

npm install ilha effect
# or Bun
bun add ilha effect

effect is a peer dependency.


Quick start

import { atom, mount } from "ilha";

const Counter = () => {
  const count = atom(0);
  return (
    <button type="button" onclick={() => count.update((n: number) => n + 1)}>
      Count: {count}
    </button>
  );
};

mount(document.getElementById("app")!, Counter);

A component is a function, async function, or generator that returns a view. Nested functions share the parent fiber. mount / renderToString on a function makes it a root.


Atoms

import { atom } from "ilha";

const count = atom(0);
count(); // read
count.set(1); // replace
count.update((n) => n + 1); // patch

In JSX, {count} subscribes the render. Derived values use Effect's Atom.map or Atom.transform:

import * as Atom from "effect/unstable/reactivity/Atom";
import { atom } from "ilha";

const items = atom([{ n: 1 }, { n: 2 }]);
const total = atom(Atom.map(items.atom, (list) => list.reduce((sum, item) => sum + item.n, 0)));

Wrap multiple writes in batch(). Derived and mutation atoms use Effect's Atom.map, Atom.transform, and Atom.fn — pass handle.atom, then wrap in atom(). Use watch(source, fn) for side effects on atom changes.

Use atom.lazy(() => …) for one-time initialization or to store a function value.

Atoms hold data. Do not store JSX in an atom.


Streams and when

Paint Effect Stream values. Yield a stream of views from a generator, or return one from an async component:

import * as Stream from "effect/Stream";
import * as Atom from "effect/unstable/reactivity/Atom";
import { atom } from "ilha";

function* List() {
  const items = atom(["a", "b"]);
  yield Stream.map(Atom.toStream(items.atom), (list) => (
    <ul>
      {list.map((item) => (
        <li key={item}>{item}</li>
      ))}
    </ul>
  ));
}

SSR takes the first emission (take(1)); the client keeps listening after mount.

Ilha also ships when for per-emission generator bodies (stale work interrupted). Side effects and pauses use Effect directly — see the Streams guide.


SSR

import { atom, renderToString, mount } from "ilha";

const Counter = () => {
  const count = atom(0);
  return <p>{count}</p>;
};

const html = await renderToString(Counter);
// <div data-ilha data-ilha-state="…"><p>0</p></div>

const host = document.querySelector("[data-ilha]");
if (host) mount(host, Counter, { hydrate: true });

| Option | Default | Meaning | | ---------------- | ------- | ------------------------------ | | snapshot | true | Embed atom values | | markers | true | Wrap in <div data-ilha> | | timeout | none | Serialize after this many ms | | captureActions | false | Probe handlers for server RPCs |

In Node, renderToString registers happy-dom when document is missing.


JSX

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "ilha"
  }
}

Event props are lowercase (onclick, onchange). Use class, not className. Use h() when you cannot use JSX.


Custom elements

import { atom } from "ilha";
import { define } from "ilha/define";

define("ilha-counter", () => {
  const count = atom(0);
  return (
    <button type="button" onclick={() => count.update((n: number) => n + 1)}>
      {count}
    </button>
  );
});
<ilha-counter data-ilha></ilha-counter>

Routing and Astro

  • @ilha/router — file-system SPA routes and Oxide server islands.
  • @ilha/astro — Astro renderer (renderToString + mount).

Docs: ilha.build


License

MIT