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 🙏

© 2025 – Pkg Stats / Ryan Hefner

who-changed-my-props

v0.1.0

Published

> A lightweight React runtime utility to trace props changes and detect unnecessary re-renders - with style.

Readme

who-changed-my-props 🕵️‍♂️

A lightweight React runtime utility to trace props changes and detect unnecessary re-renders - with style.

who-changed-my-props helps you monitor what triggers re-renders in your React components by:

  • Logging which props changed
  • Counting how many times a component re-rendered
  • Emitting warnings when a threshold is exceeded
  • Supporting custom logging (console, toast, websocket...)
  • Offering a dev overlay that shows re-render activity in real time

🚀 Why use this tool?

React components re-render more often than we think. Sometimes that's fine. Sometimes... it’s killing performance silently.

Instead of guessing, let your components snitch on themselves.

Unlike heavier tools like why-did-you-render, this utility is:

  • 🔹 Explicit: opt-in on a per-component basis
  • 🔹 Framework-agnostic: no patching, no assumptions
  • 🔹 Minimal: no global state, no Babel magic
  • 🔹 Flexible: choose how and where logs appear

📦 Installation

npm install who-changed-my-props
# or
yarn add who-changed-my-props

🧑‍💻 Usage

1. Trace manually inside a component

import { traceProps } from 'who-changed-my-props';

function ChatInput(props) {
  traceProps('ChatInput', props, { warnThreshold: 5 });

  return <input value={props.value} onChange={props.onChange} />;
}

2. Wrap any component using withTrace

import { withTrace } from 'who-changed-my-props';

const TracedButton = withTrace(Button, 'Button', { warnThreshold: 3 });

⚙️ Custom Logger

import { setTraceLogger } from 'who-changed-my-props';

setTraceLogger({
  log: (...args) => console.log('[TRACE]', ...args),
  warn: (...args) => toast.warn(args.join(' ')) // use your preferred logger
});

👀 Dev Overlay

To see a visual overlay with re-render count:

import { createDevOverlay } from 'who-changed-my-props';

createDevOverlay(); // Call this once in your app root

🧪 Example Output

🔄 [ChatInput] props changed: { value: "hello", onChange: [Function] }
⚠️ [ChatInput] rendered 6 times (threshold: 5)

📘 API Reference

traceProps(name, props, options?)

| Param | Type | Description | |---------|----------|--------------------------------------| | name | string | Display name for logs | | props | object | The props object to track | | options.warnThreshold | number? | Trigger a warning after N renders |


withTrace(Component, name, options?)

Wraps any component and auto-instruments it.


setTraceLogger(logger)

Define a custom logging system.


createDevOverlay()

Displays an overlay in the corner of your screen with re-render count.


🙌 Ideal For

  • Component performance debugging
  • Auditing prop-based reactivity
  • Creating a performance culture in frontend teams

🧠 Why not just use React DevTools?

You should. But when you want traceability inside your codebase, and the ability to log, count, warn and visualize in your own way - this tool gives you the reins.


🛠️ Roadmap

  • [ ] Group renders by component tree
  • [ ] Add live chart/graph mode to overlay
  • [ ] Enable snapshot exports for CI

🧙 Author

Q. Ackermann – Senior Engineer, Toolmaker, Systems Thinker
GitHub | KodeReview | LinkedIn


📄 License

MIT