Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RN] Move definition of public instances to ReactNativePrivateInterface #32446

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rubennorte
Copy link
Contributor

Summary

Note

This only modifies types, so shouldn't have an impact at runtime.

Some time ago we moved some type definitions from React to React Native in #26437.

This continues making progress on that so values that are created by React Native and passed to the React renderer (in this case public instances) are actually defined in React Native and not in React.

This will allow us to modify the definition of some of these types without having to make changes in the React repository (in the short term, we want to refactor PublicInstance from an object to an interface, and then modify that interface to add all the new DOM methods).

How did you test this change?

Manually synced ReactNativeTypes on top of facebook/react-native#49602 and verified Flow passes.

Caution

Do not merge this until facebook/react-native#49602 has been merged.

@react-sizebot
Copy link

Comparing: 9b042f9...77181dd

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.71 kB 515.71 kB = 92.09 kB 92.09 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 565.64 kB 565.64 kB = 100.84 kB 100.84 kB
facebook-www/ReactDOM-prod.classic.js = 636.70 kB 636.70 kB = 112.08 kB 112.08 kB
facebook-www/ReactDOM-prod.modern.js = 627.02 kB 627.02 kB = 110.50 kB 110.49 kB
react-native/shims/ReactNativeTypes.js = 8.73 kB 7.27 kB = 2.35 kB 2.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
react-native/shims/ReactNativeTypes.js = 8.73 kB 7.27 kB = 2.35 kB 2.00 kB

Generated by 🚫 dangerJS against ef5325e

rubennorte added a commit to rubennorte/react-native that referenced this pull request Feb 22, 2025
Summary:
Changelog: [internal]

This just prepares for the removal of some types from `ReactNativeTypes`, and defines some types in `ReactNativePrivateInterface` that `ReactNativeTypes` expects to be defined after facebook/react#32446

Differential Revision: D69996009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants