Home / Function/ registerProxyPort() — react Function Reference

registerProxyPort() — react Function Reference

Architecture documentation for the registerProxyPort() function in index.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  8da4305a_c643_1e18_ac18_94f672692185["registerProxyPort()"]
  406e0fbd_f3e8_fc3b_d05b_4922f1996e21["index.js"]
  8da4305a_c643_1e18_ac18_94f672692185 -->|defined in| 406e0fbd_f3e8_fc3b_d05b_4922f1996e21
  style 8da4305a_c643_1e18_ac18_94f672692185 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-extensions/src/background/index.js lines 48–59

function registerProxyPort(port, tabId) {
  ports[tabId].proxy = port;

  // In case proxy port was disconnected from the other end, from content script
  // This can happen if content script was detached, when user does in-tab navigation
  // This listener should never be called when we call port.disconnect() from this (background/index.js) script
  port.onDisconnect.addListener(() => {
    ports[tabId].disconnectPipe?.();

    delete ports[tabId].proxy;
  });
}

Domain

Subdomains

Frequently Asked Questions

What does registerProxyPort() do?
registerProxyPort() is a function in the react codebase, defined in packages/react-devtools-extensions/src/background/index.js.
Where is registerProxyPort() defined?
registerProxyPort() is defined in packages/react-devtools-extensions/src/background/index.js at line 48.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free