Skip to content

Conversation

@huntie
Copy link
Member

@huntie huntie commented Sep 15, 2025

Summary:
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:

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

@meta-cla meta-cla bot 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 Sep 15, 2025
@facebook-github-bot
Copy link
Contributor

@huntie has exported this pull request. If you are a Meta employee, you can view the originating diff in D81588145.

@huntie huntie added the JS API refinements (2025) Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API) label Sep 15, 2025
…ok#53777)

Summary:

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:

- react-native-community/discussions-and-proposals#893 (comment)
- 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
@facebook-github-bot
Copy link
Contributor

@huntie has exported this pull request. If you are a Meta employee, you can view the originating diff in D81588145.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 15, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 90ac3ac.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @huntie in 90ac3ac

When will my fix make it into a release? | How to file a pick request?

@huntie huntie deleted the export-D81588145 branch September 16, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported JS API refinements (2025) Follow-up items from our JS API changes in 0.80 (deep imports deprecation and Strict TypeScript API) Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants