Repository navigation
Upgrade react/renderer/dom visibility to "for frameworks" - #59032
Open
j-piasecki wants to merge 1 commit into
Open
j-piasecki wants to merge 1 commit into
j-piasecki wants to merge 1 commit into
Conversation
Summary:
Reclassifies `react/renderer/dom` from private to "for frameworks" under the C++ stable API three-tier visibility model.
Third-party frameworks rely on these shadow tree helpers; for example, `react-native-reanimated` calls `dom::getParentNode` to resolve a node's parent in the current revision. As a private header, `DOM.h` would hard-error for such consumers once they opt into `RN_STRICT_API`, with no escape hatch. As a "for frameworks" header it emits a suppressible warning that can be acknowledged with `RN_ALLOW_FRAMEWORKS`. Without `RN_STRICT_API` the guards are inert, so no existing build changes behaviour.
`DOM.h` only reaches `RootShadowNode.h` ("for frameworks") and `ShadowNode.h` (public), so the retier introduces no tier boundary breaks. `react/nativemodule/dom` (the `NativeDOM` TurboModule) stays private.
Changelog: [Internal]
Differential Revision: D124966422
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:
Reclassifies
react/renderer/domfrom private to "for frameworks" under the C++ stable API three-tier visibility model.Third-party frameworks rely on these shadow tree helpers; for example,
react-native-reanimatedcallsdom::getParentNodeto resolve a node's parent in the current revision. As a private header,DOM.hwould hard-error for such consumers once they opt intoRN_STRICT_API, with no escape hatch. As a "for frameworks" header it emits a suppressible warning that can be acknowledged withRN_ALLOW_FRAMEWORKS. WithoutRN_STRICT_APIthe guards are inert, so no existing build changes behaviour.DOM.honly reachesRootShadowNode.h("for frameworks") andShadowNode.h(public), so the retier introduces no tier boundary breaks.react/nativemodule/dom(theNativeDOMTurboModule) stays private.Changelog: [Internal]
Differential Revision: D124966422