react
react copied to clipboard
feat[devtools]: add method for connecting backend with custom messaging protocol
Summary
RDT backend will now expose method connectWithCustomMessagingProtocol, which will be similar to the classic connectToDevTools one, but with few differences:
- It delegates the communication management between frontend and backend to the owner (whos injecting RDT backend). Unlike the
connectToDevTools, which is relying on websocket connection and receives host and port as an arguments. - It returns a callback, which can be used for unsubscribing the current backend instance from the global DevTools hook.
This is a prerequisite for any non-browser RDT integration, which is not designed to be based on websocket.