Skip to content

fix(networking): vendor in XHRInterceptor implementation instead of importing - #1571

Merged
joshuayoes merged 1 commit into
masterfrom
refactor/vendor-xhr-interceptor
Sep 9, 2025
Merged

fix(networking): vendor in XHRInterceptor implementation instead of importing#1571
joshuayoes merged 1 commit into
masterfrom
refactor/vendor-xhr-interceptor

Conversation

@joshuayoes

@joshuayoes joshuayoes commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

Please verify the following:

  • yarn build-and-test:local passes
  • I have added tests for any new features, if relevant
  • README.md (or relevant documentation) has been updated with your changes

Describe your PR

Introduced a new XHRInterceptor module to intercept and monitor XMLHttpRequest methods in React Native. This replaces the brittle deep import strategy that breaks between react native versions.

Closes #1569

How To Test

Using Example App

  1. yarn
  2. yarn build
  3. yarn workspace example-app start
  4. yarn workspace example-app ios or yarn workspace example-app android to build the example app
  5. yarn workspace reactotron-app start to start the local Reactotron in development
  6. Make sure Reactotron is connected to the native app
  7. Navigate to the Networking tab in the example app
  8. Tap "Make an API Call"
  9. See API call happens in Reactotron plugin.
Screen.Recording.2025-09-05.at.3.35.09.PM.mov

Introduced a new XHRInterceptor module to intercept and monitor XMLHttpRequest methods in React Native. This allows for enhanced network request logging in the Reactotron inspector tool. The implementation includes callbacks for open, send, request headers, and response handling, enabling detailed insights into network activity.

Closes #1569
@joshuayoes joshuayoes self-assigned this Sep 5, 2025
@joshuayoes joshuayoes changed the title feat(networking): add XHRInterceptor for network request monitoring fix(networking): vendor in XHRInterceptor implementation instead of importing Sep 5, 2025

@frankcalise frankcalise left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested this locally and looks like it is good to go 🎉

@joshuayoes
joshuayoes merged commit a8eed61 into master Sep 9, 2025
7 checks passed
@joshuayoes
joshuayoes deleted the refactor/vendor-xhr-interceptor branch September 9, 2025 20:59
@joshuayoes

Copy link
Copy Markdown
Contributor Author

Released in reactotron-react-native@5.1.16

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vendor in XHRInterceptor implementation

2 participants