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

react-fray

v1.1.0

Published

Headless React Fiber tracing agent that connects to a control-plane server via WebSocket with a crash-resilient WAL.

Readme

React Fiber graph

Injects a live force-directed graph of React's Fiber tree into any page that runs React. bippy reads the fibers, force-graph draws them.

Shown: the three pointers every fiber has.

| Link | Meaning | Drawn as | | --- | --- | --- | | child | parent to its first child | solid blue line | | sibling | fiber to its next sibling | dashed grey line (toggle) | | return | fiber to its parent | curved orange arrow (toggle, off by default) |

Run it

npm install
npm run dev        # demo app at http://localhost:5173 with the panel already open

CLI (Recommended)

The CLI uses Playwright to launch a browser instance with the Fiber Graph script pre-injected. This is the most reliable way to inspect any existing website without dealing with CSP issues or manual script tags.

npm run build
npx fiber-graph https://react.dev

(You may need to run npx playwright install chromium first if you haven't used Playwright before).

Bookmarklet & Script Tag

If you cannot use the CLI, you can build the project and serve it locally:

npm run build      # emits dist/fiber-graph.iife.js
npm run serve      # serves dist/ at http://127.0.0.1:4173
npm run bookmarklet

Paste the printed javascript: URL into a bookmark. Click it on a React page to open the panel; click again to toggle. Alt+Shift+F also toggles. npm run watch rebuilds on change.

Injection modes

| Mode | How | Updates | | --- | --- | --- | | Live | bippy loaded before React (demo, your own app, or userscript/fiber-graph.user.js with @run-at document-start) | on every commit, throttled to about 6 per second | | DOM scan | bookmarklet or console paste, after React already booted | on DOM mutations |

The panel status line says which mode is active. For your own app, add <script src="http://127.0.0.1:4173/fiber-graph.iife.js"></script> before your entry module to get live mode without a userscript.

How the edge cases are handled

  • Hook timing. React only reports to the DevTools hook if the hook exists when React loads. Late injection can't get commit events, so roots are recovered from DOM properties (__reactFiber$…, __reactContainer$…, _reactRootContainer) by climbing return to HostRoot. Open shadow roots are searched, iframes are not.
  • Existing DevTools. If the React DevTools extension already owns the hook, bippy wraps it and roots come from hook.getFiberRoots.
  • Double buffering. Each fiber has a current and a work-in-progress twin. Traversal always starts at root.current, and node identity comes from bippy's getFiberId, which stays stable across alternates, so nodes don't flicker or reset on each commit.
  • Unchanged structure. A signature of the visible tree is compared; if nothing structural changed, the layout is left alone.
  • Large trees. max nodes (default 1500) caps traversal and the status line warns when truncated. Hiding text, DOM elements, or fragments/modes re-links children to the nearest visible ancestor.
  • Self-pollution. The panel is plain DOM in a shadow root, so it never appears in the graph and page CSS can't touch it. force-graph's built-in tooltips are disabled because their CSS is injected into <head> and would not reach the shadow root.
  • Multiple roots, portals, unmounts. Each root is a separate component in the graph; portals appear as pink nodes; disconnected roots are pruned.

Limitations

  • CSP. Pages with a strict script-src block the bookmarklet. Use the userscript, a console paste of dist/fiber-graph.iife.js, or a browser extension.
  • HTTPS pages. Loading http://127.0.0.1 from HTTPS is allowed in Chromium and Firefox but some setups block it. Host the bundle over HTTPS if so.
  • Production builds. They work, but component names are minified, and any Tag N labels may be approximate for tags added in newer React versions.
  • React DOM only. DOM scanning does not apply to React Native or other renderers. Live mode works for any renderer that reports to the hook, but DOM highlighting won't.
  • Tree layout shows the logical hierarchy with real child and sibling links on top, so only each parent's first child has a vertical line.
  • Not run in a real browser here. The project type-checks and builds, but I could not drive it in a browser from my sandbox. If something misbehaves, the status line and console are the first places to look.

Layout

src/fiber.ts     root discovery, fiber -> graph conversion (bippy)
src/panel.ts     force-graph rendering, controls, hover/click
src/main.ts      entry, throttling, show/hide API (window.__FIBER_GRAPH__)
demo/main.tsx    small app with context, memo, forwardRef, Suspense, a portal, a keyed list