WhoBuilt

Hacking React Native DevTools & Building a Plugin Framework

Feb 10, 2026· 20 min· 562 views·Watch on YouTube

Speaker

Szymon Chmal, a React Native expert at Callstack, explains how he built Rosennite, a plugin framework for React Native DevTools, at React Advanced London.

Why React Native DevTools needs plugins

Flipper let developers load custom tools such as Redux DevTools, but it had stability problems and was deprecated. React Native DevTools is more stable, but does not yet support plugins. Chmal built Rosennite as a temporary way to bring custom tools into the newer DevTools.

Constraints and the DevTools architecture

Chmal wanted to avoid maintaining a fork, keep DevTools usable if a plugin fails, let developers build plugin UIs with React, and reuse the existing device connection. He explains that React Native DevTools is a web app served locally through Metro, and that its communication uses the Chrome DevTools Protocol.

Redirecting DevTools and adding a panel

Rosennite monkey-patches `getDevToolsFrontendUrl` to replace the `debugger-frontend` path with its own URL, then uses Metro's `enhanceMiddleware` to serve the custom UI. It loads the current DevTools HTML at runtime and adds a script tag, avoiding a stale copy that could miss changes such as the CSS updates in React Native 0.81. The injected script uses DevTools UI classes to add a panel containing an iframe.

Building plugins and bridging messages

Each plugin has a React Native side, which Metro can handle, and a DevTools UI side, which needs to be bundled into browser-ready HTML and JavaScript. Rosennite's bridge uses different message handling in each environment: the plugin UI sends messages to the host with `postMessage`, and the injected script forwards them to the device. Chmal demonstrates a Network Activity plugin that inspects HTTP, WebSocket, and server-sent event traffic, including headers, response bodies, and JSON trees.

Using Rosennite

Chmal says Rosennite discovers and runs installed plugins and works with React Native CLI, Expo, Metro, and Re.Pack. It also includes official plugins. The documentation provides a quick-start guide and installation command.

Takeaways

  • Reuse an existing device communication channel when it already handles multiple devices.
  • Keep plugin failures isolated so they do not prevent developers from using the main DevTools.
  • Load the current upstream HTML at runtime and make a small injection to reduce breakage from upstream UI changes.
  • Treat a cross-environment bridge as separate implementations behind one shared message interface.
  • Bundle browser-facing plugin code separately from React Native code, which Metro can process.

Mentioned in this talk

Search inside this talk

What was claimed 9

Related talks