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

@oxog/reactlog

v1.0.1

Published

Zero-dependency React lifecycle debugger with micro-kernel plugin architecture

Readme

ReactLog

Zero-dependency React lifecycle debugger with micro-kernel plugin architecture.

Features

  • Zero Dependencies - No runtime dependencies, everything implemented from scratch
  • Micro-Kernel Architecture - Minimal core with powerful plugin system
  • Beautiful Console Output - Styled, collapsible log groups with icons
  • Full Lifecycle Tracking - Mount, unmount, updates, props, state, effects
  • Debug Panel - Optional floating UI panel with Shadow DOM isolation
  • Remote Logging - Send logs to external endpoints
  • Export Functionality - Export logs as JSON or CSV
  • Tree-Shakeable - Only bundle what you use
  • TypeScript First - Full type definitions included

Installation

npm install @oxog/reactlog
yarn add @oxog/reactlog
pnpm add @oxog/reactlog

Quick Start

import { ReactLogProvider, useLog } from '@oxog/reactlog'

// Wrap your app with the provider
function App() {
  return (
    <ReactLogProvider>
      <MyComponent userId={123} />
    </ReactLogProvider>
  )
}

// Add logging to any component
function MyComponent({ userId }) {
  useLog('MyComponent', {
    trackProps: true,
    trackState: true,
    trackEffects: true,
  })

  const [count, setCount] = useState(0)

  useEffect(() => {
    fetchUser(userId)
  }, [userId])

  return (
    <button onClick={() => setCount(c => c + 1)}>
      Count: {count}
    </button>
  )
}

Console Output

┌─ MyComponent ─────────────────────────────────
│  ⬆️  MOUNT                        12:34:56.789
│  📦 Props: { userId: 123 }
│  📊 State[0]: 0
│  🔄 Effect[0] RUN (mount)
├─────────────────────────────────────────────────
│  🔃 UPDATE                        12:34:58.123
│  📦 Props changed:
│     userId: 123 → 456
│  🧹 Effect[0] CLEANUP
│  🔄 Effect[0] RUN (deps changed: [0])
├─────────────────────────────────────────────────
│  ⬇️  UNMOUNT                      12:35:01.456
│  🧹 Effect[0] CLEANUP
│  ⏱️  Lifetime: 4.667s
└─────────────────────────────────────────────────

Core Plugins (Always Loaded)

  1. lifecycle-logger - Tracks mount, unmount, and update events
  2. props-tracker - Tracks all props changes with diff analysis
  3. state-tracker - Tracks useState and useReducer changes
  4. effect-tracker - Tracks useEffect execution and cleanup
  5. console-output - Formats beautiful console logs

Optional Plugins

import { panelUI, fileExporter, remoteLogger } from '@oxog/reactlog/plugins'

<ReactLogProvider plugins={[
  panelUI({ position: 'bottom-right' }),
  fileExporter({ format: 'json' }),
  remoteLogger({ endpoint: 'https://logs.example.com' }),
]}>
  <App />
</ReactLogProvider>
  • context-tracker - Tracks useContext value changes
  • error-tracker - Tracks Error Boundary catches
  • render-timer - Measures render duration
  • render-chain - Tracks parent→child render propagation
  • panel-ui - Debug panel overlay with Shadow DOM
  • file-exporter - Export logs to JSON/CSV
  • remote-logger - Send logs to remote endpoint

API Reference

Components

  • <ReactLogProvider> - Main provider component
  • <DebugPanel> - Debug panel (requires panelUI plugin)
  • <Log> - Wrapper component for logging

Hooks

  • useLog(name, options) - Main debug hook
  • useLogContext() - Access kernel directly
  • useLogMetrics(componentName) - Get metrics for a component

HOC

  • withLog(Component, options) - Higher-order component wrapper

Programmatic API

  • getKernel() - Access kernel instance
  • getLogs() - Get all logs
  • clearLogs() - Clear all logs
  • filterLogs(filter) - Filter logs
  • exportLogs() - Export as JSON string
  • createPlugin(config) - Create custom plugin

Creating Custom Plugins

import { createPlugin } from '@oxog/reactlog'

const analyticsPlugin = createPlugin({
  name: 'my-analytics',
  version: '1.0.0',
  type: 'optional',
  hooks: {
    onMount: (event) => {
      analytics.track('component_mount', {
        name: event.componentName,
      })
    },
    onError: (event) => {
      errorReporter.capture(event.error)
    },
  },
})

Documentation

Full documentation available at https://reactlog.oxog.dev

License

MIT