$ the-wire · showcase
React Native hardens stable API visibility and fixes text measurement
By RepoJournal · Filed · About Meta
React Native moved two renderer internals behind stable API guards and fixed an Android text-measurement bug tied to fontVariationSettings.
React Native's three-tier C++ stable API visibility model advanced [1], making `react/renderer/attributedstring` a "for frameworks" target so consumers who opt into `RN_STRICT_API` get a warning when including its headers directly, acknowledged with `RN_ALLOW_FRAMEWORKS`; without that flag the guards stay inert, so no existing builds break. A second change [2] removes an unused Hermes import from `RCTAppSetupUtils.h`, unblocking classification of the Hermes executor as a private target under the same model. Both are internal but push the platform toward stricter API boundaries.
A text-measurement fix [3] addresses `fontVariationSettings`: Android's `Paint.setFontVariationSettings` leaks a stored string across typeface changes, so legacy variable font metrics were wrong; the wrong measurement no longer happens for text with these settings. Separately, tvOS imperative focus got a correction [4] so blur and focus events emit only after focus updates, keeping JavaScript state in sync with UIKit. React DevTools also documented `react-devtools-cdt-mcp` as a page-side library [5], clarifying install and config expectations for npm consumers, and React Native absorbed routine translation batches [6].
Action items
- → Review any direct includes of react/renderer/attributedstring headers if you use RN_STRICT_API facebook/react-native [plan]
- → Verify Android layouts using fontVariationSettings after this fix facebook/react-native [plan]
References
- [1] Cover react/renderer/attributedstring with Stable API guards (#58305) ↗ facebook/react-native
- [2] Drop unused Hermes import from RCTAppSetupUtils (#58056) ↗ facebook/react-native
- [3] Fix Android text mis-measurement when using fontVariationSettings (#58320) ↗ facebook/react-native
- [4] Emit tvOS focus events after focus updates (#58372) ↗ facebook/react-native
- [5] [DevTools] Document react-devtools-cdt-mcp for npm consumers ↗ facebook/react
- [6] translation auto-update for batch 2/66 on master ↗ facebook/react-native