A framework for building native applications using React
Expose unstable_NativeText and unstable_NativeView components (#53777)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53777 Expose `unstable_NativeText` and `unstable_NativeView` components as root exports of the `react-native` package. These are exposed as `unstable_` APIs which have no semver guarantee. **Motivation** There is significant community interest / dependance on the currently private `TextNativeComponent` and `ViewNativeComponent` deep imports, to access the faster-performing inner versions of these UI components. Using `<Text>` and `<View>`, while recommended and stable, has led to measurable performance overhead in some apps when compared with these `<Native*>` counterparts. Notably, these APIs are also referenced by low-level libraries such as React Strict DOM. I am proposing this change in order to: - Unblock libraries which safely use these. - Meet users where they are at. - Unblock us from enabling the Strict TypeScript API (no deep imports). References: - https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13452047 - https://javascript.plainenglish.io/optimizing-text-component-rendering-in-react-native-b9d3565659d9 - https://github.com/search?type=code&q=react-native%2FLibraries%2FText%2FTextNativeComponent **Ideal future state** We are exposing these as unstable APIs because they should not be part of React Native's final API. The ideal end state is we improve the regular `<Text>` and `<View>` components to eliminate performance overhead and the need to access any lower level API. Changelog: [General][Added] - `unstable_NativeText` and `unstable_NativeView` are now exported from the `react-native` package Reviewed By: javache Differential Revision: D81588145 fbshipit-source-id: 2ea9b7f822286de85f49607944c6a484d1fcf242
A
Alex Hunt committed
90ac3ac7bd2c7f8761d02e503224828f8af97fec
Parent: dba8dbd
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/15/2025, 5:55:55 PM