Skip to content

Prepare ReactNativePrivateInterface for new React renderer calls to handle root/document nodes#49010

Closed
rubennorte wants to merge 3 commits into
facebook:mainfrom
rubennorte:export-D68561173
Closed

Prepare ReactNativePrivateInterface for new React renderer calls to handle root/document nodes#49010
rubennorte wants to merge 3 commits into
facebook:mainfrom
rubennorte:export-D68561173

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

Summary:
Changelog: [internal]

This adds a stub method for ReactNativePrivateInterface.createPublicRootInstance, which just returns null for now, so we can synchronize the React renderer that will try to use it to create root instances.

Initially, this will not do anything and React will just pass the null value around. When we implement the document API, we will return a proper instance and React will pass it to createPublicInstance so we can link things at runtime.

Differential Revision: D68561173

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jan 28, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68561173

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68561173

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68561173

rubennorte added a commit to rubennorte/react-native that referenced this pull request Jan 29, 2025
…calls to handle root/document nodes (facebook#49010)

Summary:

Changelog: [internal]

This adds a stub method for `ReactNativePrivateInterface.createPublicRootInstance`, which just returns `null` for now, so we can synchronize the React renderer that will try to use it to create root instances.

Initially, this will not do anything and React will just pass the `null` value around. When we implement the document API, we will return a proper instance and React will pass it to `createPublicInstance` so we can link things at runtime.

Reviewed By: javache

Differential Revision: D68561173
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68561173

Summary:

Changelog: [internal]

We're modifying some core APIs in the RN render in following diffs, so this adds a simple benchmark as a safety mechanism to verify those don't regress performance significantly.

Reviewed By: yungsters

Differential Revision: D68772175
…#49009)

Summary:

Changelog: [internal]

Native APIs so far have returned instance handles from React to reference nodes in the rendered UI tree, but now that we're adding support for the document API, this isn't sufficient to represent all types of nodes. Both for the document and for its `documentElement`, we don't have an instance handle from React that links to the node, but we're going to represent that differently.

This is a refactor so the existing methods use a mostly opaque `NativeNodeReference` type so we can implement it as a union of React instance handles and the future types we're going to introduce to support document.

Reviewed By: javache

Differential Revision: D67704855
…andle root/document nodes (facebook#49010)

Summary:

Changelog: [internal]

This adds a stub method for `ReactNativePrivateInterface.createPublicRootInstance`, which just returns `null` for now, so we can synchronize the React renderer that will try to use it to create root instances.

Initially, this will not do anything and React will just pass the `null` value around. When we implement the document API, we will return a proper instance and React will pass it to `createPublicInstance` so we can link things at runtime.

Reviewed By: javache

Differential Revision: D68561173
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D68561173

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 8678d15.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 29, 2025
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 Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants