RFC: 3P Extensions API for React Native DevTools panels#979
RFC: 3P Extensions API for React Native DevTools panels#979huntie wants to merge 3 commits intoreact-native-community:mainfrom
Conversation
|
Hi @huntie 👋 Your RFC is quite similar to a PoC I built a couple of months ago. The outcome was that I was able to load Chrome DevTools extensions into my Electron-based shell running React Native DevTools, with some additional code injected via Rozenite. I successfully ran Altair GraphQL and could see requests being sent from the device. No changes on the extension side were required. If I remember correctly, this was possible thanks to CHROME_DEVTOOLS_EXTENSION.mp4I'd be more than happy to share more details if you're interested in this approach. |
|
Hello and thanks for writing this up, @huntie. Overall we're aligned on most of the design. Some of the below refers to wip branches in your forks. A few areas worth discussing: Where we align
chrome.devtools API injectionThe We prototyped injection in the Electron shell: As mentioned, another option could be The We can start with the Extension ↔ runtime communication: WebSocket supportThe RFC proposes Extension descriptor and manifestThe main use for the manifest now would be its discovery by frameworks, is that so? Then it gets transformed into the extension descriptor shape that the dev middleware consumes. Extension discovery in the frontend: embedder script vs JSON endpointYour draft serves An alternative we can consider fetching a JSON endpoint, so DT frontend asks the dev middleware for a list of extensions. This avoids leaking the knowledge of Happy to discuss this further! |
Note
🚧 Draft proposal. No ETA, no committed plan to build this.
This RFC is linked to a speculative end-to-end implementation that I've been aggressively exploring today. Many more questions need answering around internal APIs implementing this — this doc only focuses on the outer public APIs we could introduce as an integration point for Frameworks.
I'm publishing this draft PR in the hope of early partner review / to pin a flag down on how feasible this should be to tackle when we can prioritise it.