mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Rename findNodeByComponentInstance to findNodeByComponentRef
This commit is contained in:
+4
-4
@@ -57,7 +57,7 @@ function findNodeByComponent(
|
||||
return null;
|
||||
}
|
||||
|
||||
function findNodeByComponentInstance(
|
||||
function findNodeByComponentRef(
|
||||
node: FiberNode | null,
|
||||
expectedClassInstance: React.Component
|
||||
): FiberNode | null {
|
||||
@@ -70,13 +70,13 @@ function findNodeByComponentInstance(
|
||||
}
|
||||
|
||||
{
|
||||
const returnVal = findNodeByComponentInstance(node.child, expectedClassInstance);
|
||||
const returnVal = findNodeByComponentRef(node.child, expectedClassInstance);
|
||||
if (returnVal !== null) {
|
||||
return returnVal;
|
||||
}
|
||||
}
|
||||
{
|
||||
const returnVal = findNodeByComponentInstance(node.sibling, expectedClassInstance);
|
||||
const returnVal = findNodeByComponentRef(node.sibling, expectedClassInstance);
|
||||
if (returnVal !== null) {
|
||||
return returnVal;
|
||||
}
|
||||
@@ -85,4 +85,4 @@ function findNodeByComponentInstance(
|
||||
return null;
|
||||
}
|
||||
|
||||
export { findNodeByComponentName, findNodeByComponent, findNodeByComponentInstance };
|
||||
export { findNodeByComponentName, findNodeByComponent, findNodeByComponentRef };
|
||||
|
||||
Reference in New Issue
Block a user