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

@supernathaniel/runtime-react

v0.1.0

Published

React 16.14/18 Profiler instrumentation for @fp runtimes

Readme

@supernathaniel/runtime-react

React 渲染采集与离线分析:把每次 commit 耗时变成事件,把事件变成可读的渲染诊断。

提供什么

  • PerformanceProfiler:用 React.Profiler 包裹根节点,每次 commit 发出 react:commit 事件(actualDuration / baseDuration 等)。生产构建的 React 不触发 Profiler 回调,透明传递。
  • useRenderProbe:组件级渲染探针(只在 passive effect 发事件,props 引用比较过滤挂载/重放噪声)。
  • analyzeRenderEvents(events):离线分析 react:commit 事件流,产出 RenderAnalysis——CommitGroup / ComponentStat / RenderFinding(FindingLevel 分级),viewer 与 playground 共用。
  • 辅助probeDevtoolsHook()(React DevTools hook 能力探测)、diffProps()toCommitEvent()(commit → 事件的纯函数映射,可无渲染器测试)。

兼容性

  • React 16.14 与 React 18 双一等公民:类型按 @types/react@16(最小公分母),只用两版共有的公共 API;
  • react 永远是 peer 依赖(宿主单例);Fiber 私有 API 只允许出现在明确标记的适配层,不进公共契约;
  • commit 事件同步发出(在 commit 阶段):trace 保真优先。监听方若在 commit 阶段直接 setState 会造成无限循环——消费方需轮询缓冲或节流(范式见 playground App.tsx),并 memoize profiler 子树避免被动重渲染自产事件。

谁依赖它

umi-plugin(rootContainer 注入)、viewer / playground(渲染分析)。