Repository navigation
[0.88] Preserve lazy ViewManager initialization in UIManager - #60553
Open
gabrieldonadel wants to merge 1 commit into
Open
gabrieldonadel wants to merge 1 commit into
gabrieldonadel wants to merge 1 commit into
Conversation
Summary: - Preserve lazy ViewManager property descriptors when composing UIManager. - Avoid eagerly invoking lazy ViewManager getters and unnecessary getConstantsForViewManager calls during Bridgeless initialization. - Add regression coverage for lazy, own, enumerable and one-time getter behavior. - Platform scope: This targets the Android Bridgeless lazy ViewManager path. iOS does not currently expose this lazy getter path, so no iOS runtime behavior or performance change is expected. [ANDROID] [FIXED] - Avoid unnecessary getConstantsForViewManager calls during UIManager initialization. Pull Request resolved: react#58097 Test Plan: - `yarn flow-check` - `yarn test packages/react-native/Libraries/ReactNative --runInBand` - `yarn lint --quiet` - `yarn format-check` - Verified with Android RNTester offlineDebug that startup no longer triggers eager getConstantsForViewManager calls. Reviewed By: cipolleschi Differential Revision: D124967747 Pulled By: javache fbshipit-source-id: 1a4daf139b555ed266d5a7d3a0b90ebb02cfe5be (cherry picked from commit da7c29f) Signed-off-by: Gabriel Donadel <donadeldev@gmail.com>
gabrieldonadel
force-pushed
the
@gabrieldonadel/0.88-pick-1532
branch
from
December 5, 2026 14:39
6ada007 to
ac1194a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Backport of #58097 (
da7c29f6d74) to0.88-stable, for pick request reactwg/react-native-releases#1532.UIManagerspreadUIManagerImplinto a new object. In Bridgeless modeUIManagerImplcan define enumerable lazy ViewManager getters, so the spread ran every getter during module initialization. The fix copies the property descriptors instead, so the getters stay lazy.One conflict was resolved by hand. On
main,measureLayoutandmeasureLayoutRelativeToParenttypeerrorCallbackas(error: UnsafeObject) => void.0.88-stablestill has(error: Object) => void, and that type is kept. TheUnsafeObjectimport that came with the pick is removed, since nothing uses it on this branch.Changelog:
[GENERAL] [FIXED] - Preserve lazy ViewManager initialization in UIManager
Test Plan:
git cherry-pick -xkeeps the original author.yarn jest packages/react-native/Libraries/ReactNative/__tests__/UIManager-test.js: 1 suite, 1 test, passes.eslintonUIManager.jsandUIManager-test.js: no errors.yarn flow check: no errors in the changed files.