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

@rn-dev-inspector/core

v1.1.0

Published

Core inspector component for React Native Dev Inspector

Downloads

108

Readme

@rn-dev-inspector/core

Core inspector components for React Native Dev Inspector.

Note: This is an internal package. For most use cases, install react-native-dev-inspector instead.

Installation

npm install @rn-dev-inspector/core

What's Included

This package provides the core inspector functionality:

  • Inspector - Main wrapper component that enables element inspection
  • InspectorDevMenu - Floating button to toggle inspector
  • InspectorButton - Inline button component for custom UIs
  • useInspector - Hook to access inspector state and controls
  • toggleInspectorGlobal - Global function to toggle inspector from anywhere

Usage

import {
  Inspector,
  InspectorDevMenu,
  useInspector
} from '@rn-dev-inspector/core';

export default function App() {
  return (
    <Inspector editor="code">
      <YourApp />
      <InspectorDevMenu position="bottom-right" />
    </Inspector>
  );
}

API

<Inspector> Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | disabled | boolean | false | Disable inspector entirely | | editor | string | auto | Editor command (code, cursor, webstorm, etc.) | | devServerUrl | string | auto | Metro dev server URL | | addToDevMenu | boolean | true | Add toggle to RN dev menu | | onInspectorEnabled | () => void | - | Callback when enabled | | onInspectorDisabled | () => void | - | Callback when disabled | | onElementSelected | (info) => void | - | Callback when element selected | | onElementTapped | (info) => void | - | Callback before opening editor |

<InspectorDevMenu> Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | 'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right' | 'bottom-right' | Button position | | compact | boolean | false | Use smaller button size | | showOnlyWhenInactive | boolean | false | Hide when inspector active | | containerStyle | ViewStyle | - | Custom container styles |

useInspector() Hook

const {
  isInspecting,     // boolean
  enableInspector,  // () => void
  disableInspector, // () => void
  toggleInspector,  // () => void
} = useInspector();

How It Works

The inspector uses React Native's internal getInspectorDataForViewAtPoint API to:

  1. Capture touch events on the screen
  2. Find the element at the touch point
  3. Traverse the React fiber tree to build component hierarchy
  4. Extract source locations from:
    • _debugSource (React's built-in debug info)
    • __callerSource prop (injected by optional babel plugin for precise tracking)
  5. Display an inspector panel with hierarchy, styles, and box model

Enhanced Source Tracking

When used with the babel plugin from @rn-dev-inspector/metro-plugin, the inspector receives precise source location information via the __callerSource prop injected into each JSX element. This provides more accurate "Open in Editor" functionality compared to relying solely on React's _debugSource.

Requirements

  • React Native 0.68+
  • React 17+
  • Development mode (__DEV__ must be true)

License

MIT