dillon1000/react

Commit

DevTools: Support mulitple DevTools instances per page (#22949)

This is being done so that we can embed DevTools within the new React (beta) docs.

The primary changes here are to `react-devtools-inline/backend`:
* Add a new `createBridge` API
* Add an option to the `activate` method to support passing in the custom bridge object.

The `react-devtools-inline` README has been updated to include these new methods.

To verify these changes, this commit also updates the test shell to add a new entry-point for multiple DevTools.

This commit also replaces two direct calls to `window.postMessage()` with `bridge.send()` (and adds the related Flow types).
Browse files
Changed paths16 files
First-parent comparison
M packages/react-devtools-inline/README.md ModifiedM packages/react-devtools-inline/src/backend.js ModifiedD packages/react-devtools-inline/src/constants.js DeletedM packages/react-devtools-inline/src/frontend.js ModifiedM packages/react-devtools-shared/src/backend/agent.js ModifiedM packages/react-devtools-shared/src/bridge.js ModifiedR packages/react-devtools-shell/index.html →packages/react-devtools-shell/app.html RenamedA packages/react-devtools-shell/multi.html AddedD packages/react-devtools-shell/now.json DeletedM packages/react-devtools-shell/package.json ModifiedR packages/react-devtools-shell/src/devtools.js →packages/react-devtools-shell/src/app/devtools.js RenamedA packages/react-devtools-shell/src/multi/devtools.js AddedA packages/react-devtools-shell/src/multi/left.js AddedA packages/react-devtools-shell/src/multi/right.js AddedM packages/react-devtools-shell/webpack.config.js ModifiedM packages/react-devtools/package.json Modified
Patch

Files changed

Rendering syntax-highlighted changes…