The Wire · Showcase
REACT DEVTOOLS FIXES NESTED HOC UNWRAPPING BUG
By RepoJournal · Filed · About Meta
A regex state bug in React DevTools was cutting off component name extraction after the first HOC layer, leaving deeply wrapped components unidentifiable in the inspector.
The extractHOCNames helper was using the g flag on exec() without resetting lastIndex between iterations [1] [2]. When unwrapping nested HOCs like Forget(Memo(Button)), the function would correctly strip the outer layer, but then fail to continue because lastIndex pointed past the end of the now-shorter string. This fix restores visibility into components wrapped by multiple higher-order functions, critical for debugging complex component trees in production apps. On the React Native front, ArrayBuffer support lands in Java TurboModules [3], giving native Android modules direct access to binary data without conversion overhead. The team also swept out dead code, removing the unused NativeModalManager spec and 13 related files [4]. Jest caught up on dependency maintenance [5] [6] with SimenB resolving lingering deprecation warnings across the test suite.
One email a day. Unsubscribe in one click.
Keep up with Meta in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Pull the DevTools HOC fix if debugging component names in production facebook/react [plan]
- → Review ArrayBuffer TurboModule changes if you ship binary data on Android facebook/react-native [monitor]
- → Update Jest dependencies in your CI pipeline facebook/jest [plan]
References
- [1] DevTools: Fix nested HOC name extraction in extractHOCNames ↗ facebook/react
- [2] DevTools: Fix nested HOC name extraction in extractHOCNames (#37215) facebook/react
- [3] ArrayBuffer support to Java TurboModules facebook/react-native
- [4] Remove unused NativeModalManager spec and all related code (#57806) facebook/react-native
- [5] chore: update some more deps ↗ facebook/jest
- [6] chore: update tstyche ↗ facebook/jest