-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
refactor[isChildPublicInstance]: don't leak ReactNativeFiberHostComponent to Fabric implementation #27923
refactor[isChildPublicInstance]: don't leak ReactNativeFiberHostComponent to Fabric implementation #27923
Conversation
1921908
to
0519a58
Compare
Comparing: 49439b4...5ea270a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
One unresolved case for me is the situation when we have an application with both renderers, and lets say that the last invoked renderer is Paper (the last opened screen is on Paper), but Is this even possible? If it is, then we should probably call this method on a specific renderer, based on the instances provided: if its Fabric instances, then call |
0519a58
to
b9a6699
Compare
Answer: this could happen for FB bundles, for which we don't have a control over which renderer to call at the certain point of time, because of factory pattern. We also can't use public instance definition from |
b9a6699
to
2a4a686
Compare
…nent to Fabric implementation
2a4a686
to
5ea270a
Compare
Includes a fix for useOptimistic. React upstream changes: - facebook/react#27936 - facebook/react#27924 - facebook/react#27930 - facebook/react#27923 - facebook/react#27922 - facebook/react#27917 - facebook/react#27916 - facebook/react#27918 - facebook/react#27919 - facebook/react#27914 - facebook/react#27911 - facebook/react#27909 - facebook/react#27907 - facebook/react#27906 - facebook/react#27905
Includes a fix for useOptimistic. React upstream changes: - facebook/react#27936 - facebook/react#27924 - facebook/react#27930 - facebook/react#27923 - facebook/react#27922 - facebook/react#27917 - facebook/react#27916 - facebook/react#27918 - facebook/react#27919 - facebook/react#27914 - facebook/react#27911 - facebook/react#27909 - facebook/react#27907 - facebook/react#27906 - facebook/react#27905
Includes a fix for useOptimistic. React upstream changes: - facebook/react#27936 - facebook/react#27924 - facebook/react#27930 - facebook/react#27923 - facebook/react#27922 - facebook/react#27917 - facebook/react#27916 - facebook/react#27918 - facebook/react#27919 - facebook/react#27914 - facebook/react#27911 - facebook/react#27909 - facebook/react#27907 - facebook/react#27906 - facebook/react#27905 <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-2096
…nent to Fabric implementation (facebook#27923) While inspecting the build artifacts for Fabric in https://www.internalfb.com/diff/D51816108, I've noticed it has some leaking implementation details from Paper, such as `ReactNativeFiberHostComponent`. The reason for it is the single implementation of `isChildPublicInstance` in `ReactNativePublicCompat`, in which we were using `instanceof ReactNativeFiberHostComponent`. This new implementation removes the `ReactNativeFiberHostComponent` leak, but decreases the Flow coverage.
…nent to Fabric implementation (#27923) While inspecting the build artifacts for Fabric in https://www.internalfb.com/diff/D51816108, I've noticed it has some leaking implementation details from Paper, such as `ReactNativeFiberHostComponent`. The reason for it is the single implementation of `isChildPublicInstance` in `ReactNativePublicCompat`, in which we were using `instanceof ReactNativeFiberHostComponent`. This new implementation removes the `ReactNativeFiberHostComponent` leak, but decreases the Flow coverage. DiffTrain build for commit 6639ed3.
While inspecting the build artifacts for Fabric in https://www.internalfb.com/diff/D51816108, I've noticed it has some leaking implementation details from Paper, such as
ReactNativeFiberHostComponent
.The reason for it is the single implementation of
isChildPublicInstance
inReactNativePublicCompat
, in which we were usinginstanceof ReactNativeFiberHostComponent
.This new implementation removes the
ReactNativeFiberHostComponent
leak, but decreases the Flow coverage.