1.0.9 • Published 3 years ago
click-to-react-component-intellij v1.0.9
Option+Click a Component in the browser to instantly goto the source in your editor.

Features
- Option+Click opens a context menu with the parent Components'
props,fileName,columnNumber, andlineNumber Option+Right-click opens a context menu with the parent Components'
props,fileName,columnNumber, andlineNumber
Works with frameworks like Next.js, Create React App, & Vite that use @babel/plugin-transform-react-jsx-source
- Supports
vscode&vscode-insiders' URL handling - Automatically tree-shaken from
productionbuilds - Keyboard navigation in context menu (e.g. ←, →, ⏎)
More context & faster than using React DevTools:

Installation
npm install click-to-react-component-intellijpnpm add click-to-react-component-intellijyarn add click-to-react-component-intellijEven though click-to-react-component is added to dependencies, tree-shaking will remove click-to-react-component from production builds.
Usage
+import { ClickToComponent } from 'click-to-react-component';
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
@@ -8,7 +7,6 @@ import reportWebVitals from './reportWebVitals';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
+ <ClickToComponent />
<App />
</React.StrictMode>
);+import { ClickToComponent } from 'click-to-react-component'
import type { AppProps } from 'next/app'
import '../styles/globals.css'
function MyApp({ Component, pageProps }: AppProps) {
return (
<>
+ <ClickToComponent />
<Component {...pageProps} />
</>
)+import { ClickToComponent } from "click-to-react-component";
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./index.css";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
+ <ClickToComponent />
</React.StrictMode>
);editor
-<ClickToComponent />Run Locally
Go to the project directory
cd click-to-componentInstall dependencies
pnpm installRun one of the examples:
cd apps/cra
pnpm startcd apps/next
pnpm dev
