• Stars
    star
    1,157
  • Rank 40,327 (Top 0.8 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jump to local IDE code directly from browser React component by just a simple click

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

More Repositories

1

kugimiya-rainbow-fart

傲 娇 钉 宫,鞭 写 鞭 骂 - 钉宫理惠 vscode-rainbow-fart 扩展语音包
JavaScript
816
star
2

hexo-theme-Wikitten

A theme of Hexo for personal wiki which seems like Wikitten style.
JavaScript
684
star
3

jovial

Jovial - A lovely zsh theme with responsive-design, it's pretty fast, keep simple but useful
Shell
462
star
4

python-Speech_Recognition

A simple example for use speech recognition baidu api with python.
Python
114
star
5

zsh-history-enquirer

plugin for zsh history search, enhance interaction
TypeScript
82
star
6

STM32-Contiki_Sensor_Smart_Home

Smart home drivers with contiki system | 2016TI杯四川区电设省赛一等奖
C
50
star
7

hexo-directory-category

Automatically add category to Hexo article according to the article file directory.
JavaScript
42
star
8

wiki-site

My personal knowledge management site.
CSS
37
star
9

STM32-W5500_TCP_Client

STM32F103 control W5500 as TCP client connect to TCP server.
C
25
star
10

init-macOS-dev

init my macOS development environment
Shell
22
star
11

slides

Some personal slides
CSS
16
star
12

TianVimrc

轻量级 vim 自使用配置,有一些符合我习惯的改键和增加快捷键等;
Vim Script
12
star
13

zthxxx.github.io

blog via vuepress
Vue
7
star
14

tweetopo

A simple spider for Twitter interpersonal topology.
Python
6
star
15

midk

Mapping MIDI keypress to PC keyboard, that you can work or code with your MIDI kerboard 🎉
TypeScript
5
star
16

prinalysis

print document with smart anlyze in cloud, printer & analysis, it's prinalysis.
Vue
4
star
17

LingoCaster

自用的一款在 Raycast 上完美复刻 Alfred 版 YoudaoTranslator 丝滑体验的查词翻译插件
TypeScript
4
star
18

archived-legacy-blog

This blog to record of life.
HTML
3
star
19

leetsolve

simple & light testing frame for LeetCode solutions with JavaScript
JavaScript
3
star
20

tsconfig

zthxxx's base tsconfig
3
star
21

STM32-FingerprintEntranceGuard

STM32-FingerprintEntranceGuard
C
3
star
22

dont-care-log

make git stage ignore specific log code line
JavaScript
2
star
23

zthxxx

profile for github.com/zthxxx
2
star
24

python-OpinionMonitoring

python for monitor public opinion
Python
2
star
25

CSharp-FingerprintEntranceGuardwindowsTerminal

CSharp Fingerprint Entrance Guard windows Terminal
C#
2
star
26

python-flask-IoT_Sensor_Web

A web to IoT Sensor with flask frame.
JavaScript
2
star
27

pikapika-tab

A pure New-Tab extension that could only customize backgrounds.
TypeScript
2
star
28

vectorial

[WIP] simple demo for a real-time collaborative Vector Path editing library
TypeScript
2
star
29

TunnelAssist

A SPA for assist calculate tube model
JavaScript
1
star
30

sniputils

🚀 snippet utils with powerful influence
Python
1
star
31

SSlaunch

run BBR, install shadowsocks, launch ssserver and print the config QRCode.
Shell
1
star
32

getrusage.js

system function getrusage() precompiled and binding for Nodejs
JavaScript
1
star
33

chicken-dinner-daily

daily punch for chicken dinner everyday
Python
1
star