You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exports the getDevServer function and DevServerInfo type from React Native's public API, making them available without deep imports.
Motivation
Deep imports are deprecated in v0.80 and will be removed in v0.82. Library authors currently rely on internal imports to use getDevServer:
// Current (deprecated)importgetDevServerfrom'react-native/Libraries/Core/Devtools/getDevServer'// After this PRimport{getDevServer,DevServerInfo}from'react-native'
Use Cases
HMR clients: Tools like vxrn use getDevServer() to establish WebSocket connections to the dev server for hot module replacement
Dev tooling: Libraries need to know the dev server URL for error symbolication, bundle loading, and debugging features
URL resolution: Getting the base URL for fetching assets and making requests to the packager
The function is already used internally by React Native for:
meta-claBot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Jan 6, 2026
Gut reaction here is I don't think we want to expose these on the public 'react-native' import path. However, there is scope to put these under a new 'react-native/devsupport' (or potentially '@react-native/devsupport') entry point, which is being considered (or at least I am planning to open an RFC for soon enough). This PR adds extra motivation for that design.
It should be fine for your library to continue to use this subpath export for the forseeable future (note that these warnings will not propagate to consuming apps). We missed the 0.82 target as the community needed more time, and indeed we had extra APIs to solve, like the above plan.
This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.
huntie
added
JS API stabilization (1.0)
Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API)
and removed
Stale
There has been a lack of activity on this issue and it may be closed soon.
labels
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.JS API stabilization (1.0)Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API)Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.
4 participants
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.
Summary
Exports the
getDevServerfunction andDevServerInfotype from React Native's public API, making them available without deep imports.Motivation
Deep imports are deprecated in v0.80 and will be removed in v0.82. Library authors currently rely on internal imports to use
getDevServer:Use Cases
getDevServer()to establish WebSocket connections to the dev server for hot module replacementThe function is already used internally by React Native for:
symbolicateStackTrace.js- Error stack symbolicationloadBundleFromServer.js- Dynamic bundle loadingopenFileInEditor.js- Opening source files in editorChangelog:
[GENERAL] [ADDED] - Export
getDevServerfunction andDevServerInfotype from public APITest Plan
This is a straightforward export addition. The function already exists and is well-tested internally. Consumers can now import it directly: