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

@relensdev/relens

v0.2.1

Published

React performance telemetry for AI agents — find, understand, fix, and verify optimizations

Readme

@relensdev/relens

React performance telemetry for AI agents. Find, understand, fix, and verify optimizations — powered by runtime data, not guesswork.

Install

npm install @relensdev/relens
# or
yarn add @relensdev/relens

Quick Start

Wrap your app in <RelensProvider>:

import { RelensProvider } from '@relensdev/relens';

function App() {
  return (
    <RelensProvider>
      <MyApp />
    </RelensProvider>
  );
}

That's it. Relens collects render timing, component re-renders, prop changes, effect firing patterns, and more — all accessible to AI agents via MCP tools.

How It Works

Relens instruments your React app using the built-in Profiler API and fiber tree inspection to collect performance telemetry at runtime:

  • Which components re-render and how long they take
  • Which props changed to trigger each render
  • Unnecessary re-renders (identical props)
  • useEffect/useLayoutEffect firing patterns
  • Network request timing (opt-in)
  • User interaction traces (opt-in)

The data flows to the Relens Chrome extension for local inspection, and to AI agents (like Claude Code) via MCP for automated analysis and optimization suggestions.

Configuration

All props are optional with sensible defaults.

<RelensProvider
  instanceId="my-app"    // Routing key for multi-app setups
  id="default"           // Profiler ID (supports multiple providers)
  enabled={true}         // false = zero overhead, renders Fragment only
  maxEntries={2000}      // Ring buffer cap, oldest entries evicted
  sampleRate={1.0}       // 0.0-1.0, probability of recording each render
  filter={(name) => true} // Component name filter
  network={false}        // true = capture fetch/XHR metadata
  userEvents={false}     // true = capture user interactions
>
  <MyApp />
</RelensProvider>

| Prop | Type | Default | Description | |------|------|---------|-------------| | instanceId | string | — | Routing key for server-side data bucket | | id | string | "default" | React Profiler ID | | enabled | boolean | true | false removes Profiler entirely (zero overhead) | | maxEntries | number | 2000 | Ring buffer size for render entries | | sampleRate | number | 1.0 | Render recording probability (0.0-1.0) | | filter | (name: string) => boolean | — | Filter which components are recorded | | network | boolean | false | Capture fetch/XHR request metadata | | userEvents | boolean | false | Capture user interactions (clicks, input, scroll) |

Performance

Designed for zero perceptible impact on your app:

  • Fiber walk runs synchronously during React's commit phase (~3-8ms) — necessary because fiber internals are mutable and would be corrupted if deferred
  • Data processing runs in a Web Worker off the main thread
  • enabled={false} is true zero overhead — no Profiler, no Worker
  • Graceful fallback when Workers are unavailable (SSR, jsdom)

AI Integration

Relens exposes 21 MCP tools that let AI agents query your app's runtime performance data directly. Set up the Chrome extension + MCP connection to enable AI-powered optimization workflows.

See the setup guide for full instructions.

Exports

// Component
import { RelensProvider } from '@relensdev/relens';

// Types
import type {
  RenderEntry,
  ComponentEntry,
  EffectInfo,
  NetworkEntry,
  UserEventEntry,
  RelensGlobal,
  RelensConfig,
  RelensProviderProps,
  RenderCause,
} from '@relensdev/relens';

// Version
import { VERSION } from '@relensdev/relens';

Requirements

  • React >= 18.0.0

License

MIT