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

@homeostate/tool-devtools

v0.3.0

Published

Floating devtools to inspect and edit the state a homeostate sync engine keeps in sync, as a React component or mounted from any framework

Readme

@homeostate/tool-devtools

npm minzipped size downloads license

Devtools for @homeostate/core, as a React component or mounted from any framework. A floating button opens a panel where you can inspect and edit a store's state, compare it with the synced backend document, follow a log of every change, and connect or disconnect the engine.

Install

npm install -D @homeostate/tool-devtools

The React component needs react and react-dom 18 or 19, which are optional peer dependencies: other apps use mountDevtools, which brings its own. Styles are bundled and isolated in a shadow root, so no CSS setup is needed.

Usage

import * as Y from "yjs";
import { createSyncEngine } from "@homeostate/core";
import { createYjsBackend } from "@homeostate/crdt-yjs";
import { createZustandAdapter } from "@homeostate/store-zustand";
import { HomeostateDevtools } from "@homeostate/tool-devtools";

const adapter = createZustandAdapter(useTodoStore);
const backend = createYjsBackend(new Y.Doc(), "shared");
const engine = createSyncEngine(backend, adapter);
engine.connect();

export function App() {
  return (
    <>
      <TodoList />
      <HomeostateDevtools
        sources={[{ name: "Todos", adapter, backend, engine }]}
      />
    </>
  );
}

Pass several sources to inspect several stores. With the Zustand homeostate middleware, use createZustandAdapter(store) as the adapter and store.homeostate as the engine. Pass what createPersistence returned as persistence to see and compact the stored document on the Storage tab. The engine tells the devtools which keys it keeps local and which changes are remote. Pass a network link from createNetworkLink in @homeostate/tool-devtools/network to slow down or cut the connection on the Network tab: see the documentation.

| Prop | Default | Description | | ---------------- | ---------------- | --------------------------------------------------------------------- | | sources | | One per store: { name, adapter } and the optional fields below | | buttonPosition | "bottom-right" | Viewport corner of the button: bottom-left, top-right, top-left | | panelPosition | "right" | Edge the panel docks to: left, bottom, top | | initialIsOpen | false | Whether the panel starts open, until it is opened or closed once | | open | | Controls whether the panel is open, to open it from your own UI | | onOpenChange | | Called with the new state when the panel is opened or closed | | theme | "system" | light, dark, or system to follow prefers-color-scheme | | logLimit | 200 | Log entries kept per source |

buttonPosition, panelPosition and theme are where the devtools start: a corner, side or theme picked in the panel's settings, behind the gear button, is remembered and applies instead.

Warning: edits go through the store like any local change, so every peer in the room receives them. Restoring a log entry replaces the shared state for everyone.

Without React

Apps on Angular, Vue, Svelte or no framework mount the same devtools with mountDevtools. It takes the component's props as options and returns update and unmount. The panel brings its own React and loads in the background, so the app needs no React and its initial bundle grows by less than a kilobyte.

import { mountDevtools } from "@homeostate/tool-devtools/mount";

const devtools = mountDevtools({
  sources: [{ name: "Todos", adapter, backend, engine }],
});

devtools.update({ open: true }); // change some options
devtools.unmount(); // when the store goes away

Production builds

The component renders in every build. To leave it out of production bundles, load it only in development and render it inside a Suspense boundary:

import { lazy } from "react";

const HomeostateDevtools = import.meta.env.DEV
  ? lazy(() =>
      import("@homeostate/tool-devtools").then((module) => ({
        default: module.HomeostateDevtools,
      })),
    )
  : () => null;

With mountDevtools, call it only in development, such as under import.meta.env.DEV.

See the documentation for the panel's tabs and editing behavior.

License

MIT — see LICENSE.