-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
[react-interactions] Adds more experimental Scope API methods #17042
Conversation
ReactDOM: size: 0.0%, gzip: 0.0% Details of bundled changes.Comparing: 5a71cbe...91616c9 react-art
react-dom
react-test-renderer
react-reconciler
react-native-renderer
|
add another test
7085d8e
to
fac600c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scope.getAllScopedNodes()
: probably don't need Scoped
in the method names too
This PR adds two more internal API methods to React Scopes. Note: these are experimental and may change at any time. Notably, the changes are:
getScopedNodes
->getAllNodes
. Rename to make way for new method below.getFirstNode
. Gets only the 1st matching host component.containsNode
. Validates that any given HTML node is within the sub-tree of a scope.These APIs mainly aim at adding missing functionality that would result in computationally expensive work-arounds in user-land.