You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
findInstance( node ).sayHello(); // 'Hello!' in the console
33
33
```
34
34
35
-
We will only find instances from react's class components, functional components has no instances and
36
-
37
35
## Installation
38
36
39
37
```
@@ -52,7 +50,7 @@ We can pass some options in order to retrieve the wanted instance from the DOM n
52
50
53
51
### Options
54
52
55
-
**componentName**
53
+
***componentName**
56
54
57
55
Sometimes there are more than one component instance linked to a DOM node. For example, when a component `render` method returns another component, or when using higher order components.
When there are more than one component linked to the same DOM node, `findInstance` navigates recursively through the react fibers looking for the instance of the right component we want. To make this process fast and avoid infinite loops there is a maximum number of iterations that the algorithm does until it decides that the instance can't be found. By default `findInstance` iterates `4` times looking for the instance and return `false` after not finding it.
0 commit comments