Home / Function/ UnsupportedBridgeProtocolDialog() — react Function Reference

UnsupportedBridgeProtocolDialog() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  3f831fd9_dfeb_cc0d_0f3a_14356de72557["UnsupportedBridgeProtocolDialog()"]
  18ec4422_530f_c966_12b1_68446a69be22["UnsupportedBridgeProtocolDialog.js"]
  3f831fd9_dfeb_cc0d_0f3a_14356de72557 -->|defined in| 18ec4422_530f_c966_12b1_68446a69be22
  style 3f831fd9_dfeb_cc0d_0f3a_14356de72557 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/UnsupportedBridgeProtocolDialog.js lines 28–66

export default function UnsupportedBridgeProtocolDialog(_: {}): null {
  const {dialogs, dispatch} = useContext(ModalDialogContext);
  const store = useContext(StoreContext);

  const isVisible = !!dialogs.find(dialog => dialog.id === MODAL_DIALOG_ID);

  useEffect(() => {
    const updateDialog = () => {
      if (!isVisible) {
        if (store.unsupportedBridgeProtocolDetected) {
          dispatch({
            canBeDismissed: false,
            id: MODAL_DIALOG_ID,
            type: 'SHOW',
            content: (
              <DialogContent unsupportedBridgeProtocol={store.bridgeProtocol} />
            ),
          });
        }
      } else {
        if (!store.unsupportedBridgeProtocolDetected) {
          dispatch({
            type: 'HIDE',
            id: MODAL_DIALOG_ID,
          });
        }
      }
    };

    updateDialog();

    store.addListener('unsupportedBridgeProtocolDetected', updateDialog);
    return () => {
      store.removeListener('unsupportedBridgeProtocolDetected', updateDialog);
    };
  }, [isVisible, store]);

  return null;
}

Domain

Subdomains

Frequently Asked Questions

What does UnsupportedBridgeProtocolDialog() do?
UnsupportedBridgeProtocolDialog() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/UnsupportedBridgeProtocolDialog.js.
Where is UnsupportedBridgeProtocolDialog() defined?
UnsupportedBridgeProtocolDialog() is defined in packages/react-devtools-shared/src/devtools/views/UnsupportedBridgeProtocolDialog.js at line 28.

Analyze Your Own Codebase

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

Try Supermodel Free