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

eucalypt

v0.0.15

Published

Reagent compatible-ish Squint-cljs library with no React. Builds tiny frontends.

Readme

Eucalypt

Eucalypt is a frontend library for Squint ClojureScript. It replaces Reagent & React with a compatible-ish subset of the Reagent API. It supports form-1 and form-2 Reagent components.

The goal is to build very small frontend artifacts (~10k) using "Reagent" and "ClojureScript" (if you squint hard enough). It's suitable for small pieces of one-off frontend code that do something simple, not large production web apps. The examples from the Reagent homepage have been ported and work with Eucalypt. Eucalypt is itself very small and fits in a single cljs file.

What's with the name? Eucalyptus oil, which is sometimes used in cleaning, looks like a reagent if you squint hard enough.

Use | Bugs | Gotchas | Dev | Tests | Build | Use of AI | Mr Clean

Use

Install with npm:

npm i eucalypt

Use it in your Squint cljs script like this:

(ns my-app
  (:require
    [eucalypt :as r]))

(defonce state (r/atom {}))

(defn component:main [state]
  [:<>
    [:p "Hello world!"]
    [:pre (pr-str @state)]])

(r/render
  [component:main state]
  (js/document.getElementById "app"))

There's also a "create" script you can use to bootstrap a Squint, Vite, and Eucalypt project:

npm create eucalypt myapp
cd myapp
npm install
npm run watch
npm run build # <- builds a dist/index.html

Use in JavaScript

Thanks to @borkdude for this example.

import { render, atom } from "https://esm.sh/eucalypt";
import { deref, swap_BANG_, update_in } from "https://esm.sh/squint-cljs/core.js";

const swap = swap_BANG_;

const state = atom({counter: 0});

function myComponent () {
 return ["<>",
          ["div", "Hello world"],
          ["div", "Counter: ", deref(state).counter],
          ["button", {"on-click": () => {
            console.log('clock')
            swap(state, update_in, ["counter"], (x) => x + 1);           
            }
          }, "inc"]
        ];
}

render([myComponent], document.getElementById("app"))

Bugs

If you find an example form-1 or form-2 component that works in Reagent but doesn't work with Eucalypt, please create a failing test case in the tests/src folder, and raise a PR.

Gotchas

Eucalypt gotchas:

  • Not currently reentrant. State is shared globally.
  • The only well-tested API is r/atom and r/render.
  • Lots and lots of other weirdness and edge cases for sure.
  • Only the :component-will-unmount lifecycle hook is currently wired up. Other Reagent lifecycle keys are not yet implemented yet (but :ref is).
  • It's slop code.

Some things to watch out for when using Squint, which I ran into building this:

  • Keywords are just strings. No keyword?, name etc.
  • No binding.
  • No sorted-hashmap.

Dev

We are using pnpm for dev. You don't have to but it will probably help.

pnpm i
pnpm watch

Tests

pnpm test

Build

pnpm build

Use of AI

Eucalypt is a fork of Mr Clean that has been slop-coded with AI into compiling with Squint.

Slop-coded means this library was built by:

  1. Creating failing test cases.
  2. Using various LLMs to fix the code until all tests pass.

If you're uncomfortable with this method of development, which involves less human oversight, then you may want to be careful when using this library. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.


Mr Clean (original README)

Mr Clean is a Reagent compatible ClojureScript library without dependency on React.js. At the heart of React.js is a very simple idea GUI = function(data). Reagent takes this idea even further hiccup = function(data). The advantage of using Mr Clean over Reagent is that the generated javascript of a hello-world app is half the size of that of reagent.

There is no diffing of virtual DOM. The state of components is flushed to the DOM when data changes.

What works?

Ractive atoms and cursors work as expected which are the important parts making components reactive to data changes. form 1, form 2 components are fully supported.

What doesn't work?

None of the reagent macros are implemented. r/reaction is not a macro but a function that returns an atom holding the result of evaluating a function.

form 3 components are not fully supported because not all lifecycle methods are implemented.