Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dev-inspector

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dev-inspector

dev-tool for inspect react components and jump to local IDE for component code.

  • 2.1.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
increased by3.99%
Maintainers
1
Weekly downloads
 
Created
Source

React Dev Inspector

NPM Version NPM Downloads Node.js License

Introduction

react-dev-inspector is the tool for seamlessly code navigation from browser to IDE.

With just a simple click, you can jump from a React component on the browser to its source code in your local IDE instantly. Think of it as a more advanced version of Chrome's Inspector.

See the document on: https://react-dev-inspector.zthxxx.me

Why React Dev Inspector

Have you ever run into any of these issues 🤔:

  • You've got to fix some bugs in your team's project, but you have no idea where the heck page/component's code is located.
  • You're eager to dive into an open-source project that interests you, but it's hard to find where the code for the page/component is implemented.
  • You may thinking about a component and want to quickly peek at its code, but don't want to memorize or manually expand those never-ending deep file paths.

That's exactly why react-dev-inspector was created.


Quick Look

Just check out this demo below and you'll get it in a snap.

screen record gif (8M size):

Showcase: https://react-dev-inspector.zthxxx.me/showcase

inspector-gif

Wanna try out the demo right now? Sure, here is the online demo:

Open in StackBlitz


How to Use and Configure

According to the working pipeline below, the Part.1 and Part.2 are what you need configure to use.

Basically, it's includes:

  1. add the <Inspector/> component in your page
  2. integrate the middleware in your framework's dev-server

Check the Documentation Site for more details


How It Works

Here is the working pipeline of react-dev-inspector:

Working Pipeline


0. Inject JSX Source

The compiler's plugin records source path info into React components during development stage.

Note: The 0 of Part.0 implies that this section is generally OPTIONAL. Most React frameworks offer this feature out-of-the-box, which means you usually don't need to manually configure it additionally.

1. Inspector Component

The react-dev-inspector provide a <Inspector/> component to reads the source info, and sends it to the dev-server when you inspect elements on browser.

2. Dev Server Middleware

The react-dev-inspector provide some middlewares for dev-server in most frameworks to receives source path info from API, then call your local IDE/Editor to open the source file.



Articles about it



License

MIT LICENSE

Thanks for @zthxxx @sonacy @sl1673495

Keywords

FAQs

Package last updated on 15 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc