Skip to content

feat[devtools]: add method for connecting backend with custom messaging protocol#28552

Merged
hoxyq merged 1 commit intofacebook:mainfrom
hoxyq:devtools/add-method-for-custom-messaging-protocol-for-backend-in-core
Apr 12, 2024
Merged

feat[devtools]: add method for connecting backend with custom messaging protocol#28552
hoxyq merged 1 commit intofacebook:mainfrom
hoxyq:devtools/add-method-for-custom-messaging-protocol-for-backend-in-core

Conversation

@hoxyq
Copy link
Copy Markdown
Contributor

@hoxyq hoxyq commented Mar 13, 2024

Summary

RDT backend will now expose method connectWithCustomMessagingProtocol, which will be similar to the classic connectToDevTools one, but with few differences:

  1. 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.
  2. 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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants