mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
We should provide a way for consumers to handle the installation on their own, so the index entrypoint will just export the APIs and won't have any side-effects. The `/register` entrypoint (via `import react-devtools-cdt-mcp/register`), will subscribe an event listener and install the tools.
13 lines
448 B
JavaScript
13 lines
448 B
JavaScript
// Import the register entry first so it installs the DevTools hook and
|
|
// registers the chrome-devtools-mcp tool group BEFORE react-dom evaluates — the
|
|
// hook must be in place when React's renderer injects on the first commit.
|
|
import '../../src/register.js';
|
|
|
|
import * as React from 'react';
|
|
import {createRoot} from 'react-dom/client';
|
|
|
|
import App from './App';
|
|
|
|
const root = createRoot(document.getElementById('root'));
|
|
root.render(<App />);
|