This repository was archived by the owner on Jun 26, 2020. It is now read-only.
Add connectToDevTools(options) for React Native #494
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently RN essentially uses a fork of
backend/websocketConnect.js
.RN has a few special needs:
In this PR, I am adding a new API to
react-devtools-core
that works likerequire('react-devtools')
but provides additional customization for sophisticated consumers like RN. My work-in-progress rewrite of RN'ssetupDevtools
now looks like this:It is still very flaky and often doesn’t connect, but the module boundaries themselves seem fine to me, and I’ll be cherry-picking some changes RN has made to the server so that it’s less flaky. (Might be some race condition or connection issue.)
So this is work in progress but I’d like feedback in case I’m going in a wrong direction.