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

react-data-debugger

v1.1.0

Published

A developer debugging tool to view js object changes over time

Readme

react-data-debugger

A developer debugging tool to view js object changes over time. This tool is intended for using while developing, and not for production code.

Built with ballerina

Goals and contribution

Debugging react issues, particularly with state changes and excess rendering often requires examining data structures under change.

Using console logs makes it hard and time consuming to detect changes in the data. Rendering the data straight on the page makes it hard to catch real time changes.

This widget allows you to render and page through changes to an js object without interfering with your code or layout.

It's main goals are to be easy to use with minimal set up and to provide a basic set of useful features.

Quick start

1. Install

npm

npm i react-data-debugger --save-dev

yarn

yarn add react-data-debugger --dev

2. Import Debugger to any jsx file

import { Debugger } from "react-data-debugger";

3. Use the Debugger either as a function, or a JSX component (as many times as needed) within your React component and pass the object as the first argument and, if desired, pass options as the second.

export const BuggyComponent = (props) =>
    {
        const [myObject, setMyObject] = useState({});

        Debugger({jsObject: myObject, open: true, label: "1"})

        return (
            <>
            
                <Debugger jsObject={myObject} label="2" open />
                <h1> My component </h1>
                ....
                
            </>
        )
    }

Options

The debugger accepts some options for convenience:

| prop | type | Function | | ---- | ---- | --------- | | label | string | renders a name for the debugger, useful when using multiple debuggers | open | boolean | The debugger is initially open | lightMode | boolean | The debugger is initially in lightmode | noReplaceUndefined | boolean | When true, does not replace undefined values with null in the displayed output, reflecting the actual js object.

Note: The options are not global and must be specified per debugger

Additional Info

You can use the Debugger as man times as desired within a component to debug different data.

It can be handy to call the debugger with the same data to examine differences in steps over time (diffing).

Each debugger is rendered in its own shadow dom, avoiding css clashes.

The javascript object passed in is rendered using JSON.stringify, according the JSON spec, undefined values are stripped out. This may be undesirable for debugging, so by default undefined values are replaced with null. This helps tracking a value over time. This behaviour can be turned off by setting the noReplaceUndefined prop.