Skip to content

Keep Fabric internals out of the public API snapshot - #60475

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D135632950
Dec 2, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D135632950

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:

Context

The public findNodeHandle export is a direct alias of ReactFabric.findNodeHandle. Its inferred typeof declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

Changes

Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Differential Revision: D135632950

Summary:
## Context
The public `findNodeHandle` export is a direct alias of `ReactFabric.findNodeHandle`. Its inferred `typeof` declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

## Changes
Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Differential Revision: D135632950
@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 Dec 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Dec 2, 2026
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135632950.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@javache javache 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.

Review automatically exported from Phabricator review in Meta.

rubennorte added a commit to rubennorte/react-native that referenced this pull request Dec 2, 2026
Summary:

## Context
The public `findNodeHandle` export is a direct alias of `ReactFabric.findNodeHandle`. Its inferred `typeof` declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

## Changes
Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D135632950
rubennorte added a commit to rubennorte/react-native that referenced this pull request Dec 2, 2026
Summary:

## Context
The public `findNodeHandle` export is a direct alias of `ReactFabric.findNodeHandle`. Its inferred `typeof` declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

## Changes
Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D135632950
@meta-codesync
meta-codesync Bot merged commit 5869bf5 into react:main Dec 2, 2026
110 of 116 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in 5869bf5

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

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 2, 2026
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. 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